The script contents don't seem to matter; I can demonstrate the problem with this:
// ==UserScript== // @name test_reload_problem // @namespace neil.weinstock.test // @description Just a simple script to demonstrate the problem // @include /^https://.*\.rallydev\.com/.*/changesets$/ // ==/UserScript== alert("Script ran"); I don't know how to reproduce it on any other page than the ones I'm using, though, so I am setting up a free Rally trial account which I can give you access to, and I should be able to let you experience it there (crosses fingers). The Rally account will only be up for 30 days, but hopefully that should be enough for you to see what the problem is. Once I have the account ready, I'll file this on Github. - Neil On Sunday, May 6, 2012 5:00:06 PM UTC-4, Anthony Lieuallen wrote: > > Can you provide the exact script behaving this way? Or, ideally, a > reduced test case which exhibits this behavior, on a page that doesn't > require a login? > > If so, it would be great if you could file this in our issue tracker: > https://github.com/greasemonkey/greasemonkey/issues > > On Sun, May 6, 2012 at 3:24 PM, neilw <[email protected]> wrote: > >> <this question previously posted to >> StackOverflow<http://stackoverflow.com/questions/10456392/greasemonkey-script-only-runs-when-page-is-reloaded> >> > >> >> I have a script to add some links to a changesets page in >> Rally<http://www.rallydev.com/>. >> The script works fine, but *only* when I reload the page. If I just >> navigate (via links, forward/back buttons, etc.) to a matched page, the >> script does not run, but it is listed in the Greasemonkey menu, with a >> checkmark next to it. >> >> So it *seems* like the matching is working fine, but for whatever reason >> the page is not firing the DOMContentLoaded event when I navigate to the >> page. I tried @run-at document-start just for kicks, and it made no >> difference. >> >> I'm not sure how to either (a) figure out what's going on, or (b) fix >> this. >> >> Here is the @include rule, which seems to be working fine: >> >>> include /^https://.*\.rallydev\.com/.*/changesets$/ >> >> >> And here is a URL that I'm testing with: >> >>> https://rally1.rallydev.com/#/4745909548/detail/userstory/6138899084 >>> /changesets >> >> >> I wonder if the hash in the URL is causing a problem somehow, but I can't >> understand why it would work only on a reload. Any thoughts? >> >> Thanks, >> Neil >> >> -- >> You received this message because you are subscribed to the Google Groups >> "greasemonkey-users" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/greasemonkey-users/-/fBB_haNojzcJ. >> 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. >> > > -- You received this message because you are subscribed to the Google Groups "greasemonkey-users" group. To view this discussion on the web visit https://groups.google.com/d/msg/greasemonkey-users/-/xeS_8O9XWmIJ. 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.
