Просмотр исходного кода

fix: check remove every 24 hours

Gerald 6 лет назад
Родитель
Сommit
200ed5d26c
1 измененных файлов с 6 добавлено и 1 удалено
  1. 6 1
      src/background/index.js

+ 6 - 1
src/background/index.js

@@ -75,6 +75,11 @@ function autoUpdate() {
   }
   }
 }
 }
 
 
+function autoCheckRemove() {
+  checkRemove();
+  setTimeout(autoCheckRemove, 24 * 60 * 60 * 1000);
+}
+
 const commands = {
 const commands = {
   NewScript(id) {
   NewScript(id) {
     return id && cache.get(`new-${id}`) || newScript();
     return id && cache.get(`new-${id}`) || newScript();
@@ -242,7 +247,7 @@ initialize()
   setTimeout(autoUpdate, 2e4);
   setTimeout(autoUpdate, 2e4);
   sync.initialize();
   sync.initialize();
   resetBlacklist();
   resetBlacklist();
-  checkRemove();
+  autoCheckRemove();
 });
 });
 
 
 // Common functions
 // Common functions