diff options
author | Jesús <heckyel@hyperbola.info> | 2022-04-06 10:38:06 +0800 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2022-04-06 10:38:06 +0800 |
commit | 8aeb670be1d252807252ee2bfe99b15b81c3e28d (patch) | |
tree | ced0973165449d620c5c40876c37ab16b17655f9 /js/storage.js | |
parent | 5aa99a2ea2b683ba35eb36dfc54efd79f3cfcb85 (diff) | |
download | ematrix-8aeb670be1d252807252ee2bfe99b15b81c3e28d.tar.lz ematrix-8aeb670be1d252807252ee2bfe99b15b81c3e28d.tar.xz ematrix-8aeb670be1d252807252ee2bfe99b15b81c3e28d.zip |
update from upstream
Diffstat (limited to 'js/storage.js')
-rw-r--r-- | js/storage.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/js/storage.js b/js/storage.js index f5afca8..24249ab 100644 --- a/js/storage.js +++ b/js/storage.js @@ -2,7 +2,7 @@ ηMatrix - a browser extension to black/white list requests. Copyright (C) 2014-2019 Raymond Hill - Copyright (C) 2019-2020 Alessio Vanni + Copyright (C) 2019-2022 Alessio Vanni This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -552,7 +552,7 @@ Components.utils.import('chrome://ematrix/content/lib/Tools.jsm'); }; ηMatrix.scheduleAssetUpdater = (function () { - let timer; + let timer = undefined; let next = 0; return function (updateDelay) { @@ -618,11 +618,11 @@ Components.utils.import('chrome://ematrix/content/lib/Tools.jsm'); if (details.assetKeys.length !== 0) { this.loadHostsFiles(); } - if (this.userSettings.autoUpdate) { - this.scheduleAssetUpdater(25200000); - } else { - this.scheduleAssetUpdater(0); - } + + ηm.scheduleAssetUpdater(ηm.userSettings.autoUpdate ? + 7 * 60 * 100000 : + 0); + vAPI.messaging.broadcast({ what: 'assetsUpdated', assetKeys: details.assetKeys |