Version 1.24.0

This commit is contained in:
Kevin R
2022-03-25 18:01:59 +01:00
parent 6f5a182c77
commit 63b557cf8c
6 changed files with 90 additions and 114 deletions

View File

@@ -25,13 +25,12 @@
* This watchdog restarts the whole Add-on, when the check fails.
*/
const CHECK_INTERVAL = 60000;
const __dirtyURL = "https://clearurls.roebert.eu?utm_source=addon";
const __cleanURL = new URL("https://clearurls.roebert.eu").toString();
setInterval(function() {
if(isStorageAvailable() && storage.globalStatus) {
const dirtyURL = "https://clearurls.roebert.eu?utm_source=addon";
const cleanURL = "https://clearurls.roebert.eu";
if(pureCleaning(dirtyURL, true) !== cleanURL) {
if(new URL(pureCleaning(__dirtyURL, true)).toString() !== __cleanURL) {
storage.watchDogErrorCount += 1;
console.log(translate('watchdog', storage.watchDogErrorCount));
saveOnExit();
@@ -41,4 +40,4 @@ setInterval(function() {
saveOnExit();
}
}
}, CHECK_INTERVAL);
}, CHECK_INTERVAL);