killing all timeouts in js
- 1 minutes read - 63 wordsthis article has a nice trick for killing all javascript timeouts:
function stopAllTimeouts() {
var id = window.setTimeout(null, 0);
while (id--) {
window.clearTimeout(id);
}
}
which can be entered on the javascript console and then run with
stopAllTimeouts()
This is an effective way to prevent javascript timeouts from doing a whole variety of things, like
- carousels
- endless scrolls
- any other kind of animations