J
J
JSent2017-08-21 15:58:44
JavaScript
JSent, 2017-08-21 15:58:44

Can userscript continue executing after navigating to another page?

I am writing a userscript bot for the browser. When executed, the script runs on the page and is disabled when you navigate to another page. On another page, it is already starting again. Of course, you can add different scripts for different pages, but this does not completely solve the problem. When you run the script again, data is lost, i.e. the scope of the variable is limited to one page.
You can try to save the necessary data somewhere else and load it from there. But this solution does not seem attractive.
Is there a way to continue executing a script even after a page change?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question