Explorar el Código

Made only single instance of timer

Min hace 5 años
padre
commit
6d70ca46b5
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      yt-activity.user.js

+ 2 - 1
yt-activity.user.js

@@ -9,7 +9,8 @@
 
 (() => {
   'use strict';
-  setInterval(() => {
+  if(window._lact_updater) clearTimeout(window._lact_updater); 
+  window._lact_updater = setInterval(() => {
     window._lact = Date.now();
   }, 300000);
 })();