user652649
user652649

Reputation:

is there a way to run a script in developer tools that survives to page reloads?

is possible to run a script in chrome / firefox / msie's developer tools that survives to page loads/reloads?

for example, I want to get a link URL in page A, load that URL B and get its page title, then I want to return back in page A, select another link and so on

now, if I call window.location.href = somelink; the new page is loaded but the script dies while changing page

is this possible?

thank you in advance

Upvotes: 0

Views: 1059

Answers (2)

jaredwilli
jaredwilli

Reputation: 12308

You could try creating a new Snippet in Sources, and run that each time.

I believe also, that if you run a script in the Console, with preserve log turned on that it will keep whatever is entered into the console until the devtools is closed. It gets stored in V8 if I'm not mistaken, I could be. I'd try that out though too, since I feel like it does.

Upvotes: 0

NoBugs
NoBugs

Reputation: 9496

You could probably write a Greasemonkey script to do this, since Greasemonkey has the ability to store data.

Something like if (location.host=='stackoverflow.com') {set some setting, go to other page} could work for multiples sites.

I'm not sure about the userscript storage support in other browsers like Opera/Chrome though.

Upvotes: 1

Related Questions