Browse Source

fix: check remove every 24 hours

Gerald 6 years ago
parent
commit
200ed5d26c
1 changed files with 6 additions and 1 deletions
  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 = {
   NewScript(id) {
     return id && cache.get(`new-${id}`) || newScript();
@@ -242,7 +247,7 @@ initialize()
   setTimeout(autoUpdate, 2e4);
   sync.initialize();
   resetBlacklist();
-  checkRemove();
+  autoCheckRemove();
 });
 
 // Common functions