-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FireMonkey script fails to start on its own #649
Comments
Can you post a test script so that I can test it? |
Okay, this is weird. This is my test script:
This doesn't cause any logging to happen. But just to make sure that I hadn't screwed something up, I changed the match:
I then checked that I was getting logs on any random web page, and I was. But before I changed it back, I checked my original page, and it was running there, too. So I changed the match back, and it failed to run again. But the icon showed that it matched. So then I changed it back to match everything and told it to log
I then went back to my original page and it's logging the location over and over and over:
(My real internal IP address redacted.) The real location's "hostname" is a bare IP address. Is that relevant? |
|
Like I said, the page I'm wanting to affect with this userscript is only accessible as a new tab/window from another page, and once that window loads, it's so immediately bogged down with whatever it's doing that it takes a very long time to get a console up: probably well over 5 seconds, by which time I would miss seeing a log entry that's only run once. Oh, but I can have it
That works on basically every page, including the page I'm interested in. (Oddly, it does not work on https://www.yahoo.com/.) If I change that What I just discovered is that if I set the
I chopped off the beginning in order to protect my internal IP address, but that definitely ends with just Maybe there is some trailing data in what's being checked and I guess this means that I have a workaround, but I'd like to understand why it's not working with the un-wildcarded path. |
Check from Web Developer Tools under Debugger tab and see if the userscript is loaded.
As you have mentioned, there might be some invisible trailing characters in the path. Another scenario is that ...
JavaScript navigation is a problem for content script & userscript injection. Many sites are using it (e.g. Github) and the userscript injection API doesn't fire on JavaScript navigation (as it is not a real navigation & simply replaces the content of page). See also: |
I guess I don't know how to do that. I have set it back to match every page and it's definitely sending the alert, but I don't see anywhere in the Debugger tab where it shows the script. I think I found the problem, and I don't know if it's a bug or not. It turns out that the URL that's being requested is: https://a.b.c.d/app/ucsm/kvm.html?&kvmIpAddr=w.x.y.z If I set the I confirmed that if I set the match to I guess something on the page I'm trying to get this script to run on is stripping the query string from the URL shown in the URL bar, so I didn't even know it was there until I did this browser.link.open_newwindow trick. |
AFA matching, the following are not the same. Many sites use the search property to point to different pages.
|
Ugh, I guess you're right. It's possible that a query-less URL could be distinct from the same URL with a query. Lesson learned: Every |
I have a userscript that functions fine when I manually run it via icon->script->Run, but it doesn't ever start on its own. It matches the URL, the icon shows a "1", and the script is listed in the upper section after clicking the icon, but it doesn't ever seem to actually do anything at all.
I have actually written a test userscript that is just:
and it still doesn't run until I manually click the Run button. It feels like it's just never triggered. I believe that I have tried all the possible
@run-at
values.The page, unfortunately, can only be run as a popup from another page (at least I haven't found a way to get it to function otherwise), and then it bogs down as soon as it's loaded, and it takes several seconds for me to be able to bring up the developer tools, which makes it that much more difficult to troubleshoot.
What can I try to do to run this down?
The text was updated successfully, but these errors were encountered: