zhaoke 1 year ago
parent
commit
fc2c125869
1 changed files with 6 additions and 2 deletions
  1. 6 2
      public/configLoader.js

+ 6 - 2
public/configLoader.js

@@ -1,11 +1,15 @@
 if (!window.configLoadLoop) {
 if (!window.configLoadLoop) {
   window.configLoadLoop = setInterval(function () {
   window.configLoadLoop = setInterval(function () {
+    if (window.configLoadLoop) {
+      clearInterval(window.configLoadLoop)
+      window.configLoadLoop = null
+    }
     document.head.removeChild(document.getElementById('configJS'))
     document.head.removeChild(document.getElementById('configJS'))
     setConfigJS()
     setConfigJS()
-  }, 60 * 1000)
+  }, 60 * 100)
 }
 }
 
 
-function setConfigJS() {
+function setConfigJS () {
   const config = document.createElement('script')
   const config = document.createElement('script')
   config.id = 'configJS'
   config.id = 'configJS'
   config.type = 'text/javascript'
   config.type = 'text/javascript'