The site may set the timer before your script runs at document-end
so you may want to run it on document-start
. The real site may be using a worker or an iframe to run the timers. There are also other methods of imitating timers via DOM events.
The site may set the timer before your script runs at document-end
so you may want to run it on document-start
. The real site may be using a worker or an iframe to run the timers. There are also other methods of imitating timers via DOM events.
HTML = https://pastebin.com/btADhYfC
I've tried to execute all these codes and none of them worked
// ==UserScript==
FREEZE TIMER! ');
// @name CountDown Freezer
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @include *
// @grant none
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.js
// @run-at document-end
// ==/UserScript==
(function() {
'use strict';
setTimeout(function(){
function stop()
{
document.querySelector("span.timer_autosubmit_disabled").innerText = 'false'
for (var i = 1; i < 99999; i++)
window.clearInterval(i);
}
document.querySelector("#breadcrumbs").insertAdjacentHTML('beforeend', '
document.querySelector("#Stop_IT").onclick = function(){
stop();
}
}, 500);
/*
window.timeoutList = new Array();
window.intervalList = new Array();
window.oldSetTimeout = window.setTimeout;
window.oldSetInterval = window.setInterval;
window.oldClearTimeout = window.clearTimeout;
window.oldClearInterval = window.clearInterval;
window.setTimeout = function(code, delay) {
var retval = window.oldSetTimeout(code, delay);
window.timeoutList.push(retval);
return retval;
};
window.clearTimeout = function(id) {
var ind = window.timeoutList.indexOf(id);
if(ind >= 0) {
window.timeoutList.splice(ind, 1);
}
var retval = window.oldClearTimeout(id);
return retval;
};
window.setInterval = function(code, delay) {
var retval = window.oldSetInterval(code, delay);
window.intervalList.push(retval);
return retval;
};
window.clearInterval = function(id) {
var ind = window.intervalList.indexOf(id);
if(ind >= 0) {
window.intervalList.splice(ind, 1);
}
var retval = window.oldClearInterval(id);
return retval;
};
window.clearAllTimeouts = function() {
for(var i in window.timeoutList) {
window.oldClearTimeout(window.timeoutList[i]);
}
window.timeoutList = new Array();
};
window.clearAllIntervals = function() {
for(var i in window.intervalList) {
window.oldClearInterval(window.intervalList[i]);
}
window.intervalList = new Array();
};
window.setTimeout = function(code, delay, toBeAdded) {
var retval = window.oldSetTimeout(code, delay);
var toBeAdded = toBeAdded || false;
if(toBeAdded) {
window.timeoutList.push(retval);
}
return retval;
};
var id = window.setTimeout(function() {}, 0);
while (id--) {
window.clearTimeout(id); // will do nothing if no timeout with id is present
}
var max = setTimeout(function(){ },1);
for (var i = 1; i <= max ; i++) {
window.clearInterval(i);
window.clearTimeout(i);
if(window.mozCancelAnimationFrame)window.mozCancelAnimationFrame(i); // Firefox
}
*/
})();