On May 29, 2:03 pm, Sam Larison <[email protected]> wrote: > see window.history.pushState
Ah, I didn't realize that using pushState/replaceState would actually trigger Greasemonkey to fire again. IMO, it really shouldn't, because the DOM is not being re-loaded. Just because the url changes doesn't necessarily mean that the page is changing, and you could run the risk of a GM script being run twice or more on the same DOM. I'm also finding that the script does not fire consistently. Even though the url changes (I assume via pushState), the script is sometimes not fired again. So it's not really dependable. For now, I will stick with setting a flag on unsafeWindow, and exiting my script if the flag is already set. That will guarantee that I run only once. If there is a preferred work-around, let me know. Thanks for the clarification! Matt Kruse -- You received this message because you are subscribed to the Google Groups "greasemonkey-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/greasemonkey-users?hl=en.
