Added local storage event listener

This commit is contained in:
liyunze 2023-11-12 13:36:12 +08:00
parent efcc8000f8
commit 52bbde40bd
2 changed files with 11 additions and 1 deletions

View file

@ -5,7 +5,7 @@ const configs = (function () {
const enableLimit = false; // true or false const enableLimit = false; // true or false
const limit = 10; // integer const limit = 10; // integer
const modifyLocalStorage = true; // true or false const modifyLocalStorage = false; // true or false
const showOnlyStreamerTasks = false; // true or false const showOnlyStreamerTasks = false; // true or false
// animation // animation

View file

@ -978,6 +978,16 @@ function cancelAnimation() {
// console.log("animation cancelled"); // console.log("animation cancelled");
} }
if (!settings.modifyLocalStorage) {
window.addEventListener(
"storage",
function () {
renderTaskListToDOM();
},
false
);
}
(function () { (function () {
setupDB(); setupDB();
importStyles(); importStyles();