1

If a Greasemonkey script has functions running, and then navigates to a new page using window.location.assign(), is there a way to keep those functions running, and without the entire script reloading? I'm wondering this since Greasemonkey is a browser plugin, maybe it can keep working no matter what page you navigate to.

I don't think I can use Ajax, or an iframe since it needs to navigate to different domains.

Thank you for any help you can give!

dda
  • 6,030
  • 2
  • 25
  • 34
  • I'll add that if this is not possible, information can still be stored in cookies with javascript across pages. Thanks DDA for the helpful edit! :) – Digital-Christie Dec 02 '15 at 05:57

1 Answers1

2

I doubt it is possible. Greasemonkey is a browser plugin, but the script you created for a specific page works only inside this page, not globally. Once you navigate away, the script, part of the page you navigate away from, is killed, like the rest of the page.

dda
  • 6,030
  • 2
  • 25
  • 34