configLoader.js 577 B

123456789101112131415
  1. if (!window.configLoadLoop) {
  2. const config = document.createElement('script')
  3. config.id = 'configJS'
  4. config.type = 'text/javascript'
  5. config.src = './config.js?t=' + new Date().getTime()
  6. document.head.appendChild(config)
  7. window.configLoadLoop = setInterval(function () {
  8. document.head.removeChild(document.getElementById('configJS'))
  9. const config = document.createElement('script')
  10. config.id = 'configJS'
  11. config.type = 'text/javascript'
  12. config.src = './config.js?t=' + new Date().getTime()
  13. document.head.appendChild(config)
  14. }, 60 * 1000)
  15. }