Added local storage event listener
This commit is contained in:
parent
efcc8000f8
commit
52bbde40bd
2 changed files with 11 additions and 1 deletions
|
|
@ -5,7 +5,7 @@ const configs = (function () {
|
|||
const enableLimit = false; // true or false
|
||||
const limit = 10; // integer
|
||||
|
||||
const modifyLocalStorage = true; // true or false
|
||||
const modifyLocalStorage = false; // true or false
|
||||
const showOnlyStreamerTasks = false; // true or false
|
||||
|
||||
// animation
|
||||
|
|
|
|||
|
|
@ -978,6 +978,16 @@ function cancelAnimation() {
|
|||
// console.log("animation cancelled");
|
||||
}
|
||||
|
||||
if (!settings.modifyLocalStorage) {
|
||||
window.addEventListener(
|
||||
"storage",
|
||||
function () {
|
||||
renderTaskListToDOM();
|
||||
},
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
(function () {
|
||||
setupDB();
|
||||
importStyles();
|
||||
|
|
|
|||
Loading…
Reference in a new issue