I've encountered a very badly designed website, and most of the "dynamic" content on the site is changed within setTimeout
/setInterval
functions.
There is one very annoying setInterval
function which checks page activity very quickly, and I would like to override this function.
What I tried is clearing all the setInterval
values, one by one to check if the function stopped. Also, clearing all the possible setInterval
values like this: for(let i = 0; i < 1000; i++) clearInterval(i);
, stops the "dynamic" page rendering, WHICH I DONT WANT TO
Question: 1. is there any way to look into the interval
or timeout
function and clear them?
2. is there a better way?
My current solution: I'm overriding the setInterval
and setTimeout
before page loaded, and log the function .toString()
within.