L
L
lightalex2015-09-30 15:34:09
JavaScript
lightalex, 2015-09-30 15:34:09

How to stop the timer?

Hello!
There is a page on which the timer is ticking
There is a piece of js code on this page that is responsible for deleting the Internet at the end of the timer
We need to save humanity and somehow remove this piece of js from the page
Using a text editor, it will not be possible to edit the page, since the page comes from the server
Then there is a need to somehow edit the js code during its execution
How to do this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
GreatRash, 2015-09-30
@GreatRash

This is of course a perversion , but you can stupidly stop all the timers on the page. When you call setTimeout() we get the timer ID which is incremented each time. So you can get the maximum timer ID and kill everything that was before it:

var maxTimeoutID = setTimeout(function() { return; }, 1000);

do {
  clearTimeout(maxTimeoutID);
  maxTimeoutID--;
} while (maxTimeoutID > 0);

V
Vladimir_Feschenko, 2015-09-30
@Vladimir_Feschenko

Оно, конечно, странно что JS "удаляет интернет" ... Отключить выполнение JS в браузере.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question