Created
January 27, 2023 09:57
-
-
Save 0xdd04/ff925a05bb50c1c5c1ae8c53fadd94a5 to your computer and use it in GitHub Desktop.
Revisions
-
0xdd04 revised this gist
Jan 27, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ var wkwkw = 0; var now = 999999; // might break if selector changes const interval2 = setInterval(function() { now = parseInt(document.querySelector("#foot-bar > div.footer__btns-container > div:nth-child(1) > button > div > span > span").innerHTML); -
0xdd04 created this gist
Jan 27, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ // ==UserScript== // @name Autoclose Zoom Tab // @namespace Autoclose Zoom Tab // @include * // ==/UserScript== // separate words or phrases with a comma var wkwkw = 0; var now = 999999; // might break if selector changed const interval2 = setInterval(function() { now = parseInt(document.querySelector("#foot-bar > div.footer__btns-container > div:nth-child(1) > button > div > span > span").innerHTML); wkwkw = Math.max(wkwkw, now); console.log(wkwkw, now); }, 5000); const interval = setInterval(function() { now = parseInt(document.querySelector("#foot-bar > div.footer__btns-container > div:nth-child(1) > button > div > span > span").innerHTML); console.log(now); }, 5000); // assuming at least 0.33333 is an attentive listener, lol. if (now * 1.5 < wkwkw) { // can't close tab since new API, so open :D var win = window.open("http://localhost:8000","_self"); win.close(); }