-
Notifications
You must be signed in to change notification settings - Fork 323
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
GM fails to detect user scripts if the URL has a query string. #2931
Comments
I've just tested to load files like Edit: Strange, tested that again, this time nothing happened. Maybe my browser stripped it away. |
This is caused by the Match Pattern Array in user-script-detect.run.js, which is used when adding the This can be resolved by changing:
to
in src/bg/user-script-detect.run.js. Adding the second entry in the Match Pattern Array matches all URLs where the URL path ends in
|
I encountered this when attempting to load a userscript from a GitHub private repository. While the original URL for the userscript contains no query string, GitHub redirects that URL to one that contains a TM, on the other hand, has no trouble doing so. I did not test to see if TM stumbles over there being a query string when the original URL contains one. For the GitHub private repository URLs, TM detects the first |
@makyen Just to be sure, are you sure the question mark isn't a special sign like the asterisk, in whatever method is used here for wildcards? Secondly, what if there are two question marks in a url? In a normal url, I believe the second one will be part of the query string and is taken like a literal question mark. |
@Cerberus-tm Yes, the HTML5 requires an additional Unfortunately, Match Patterns are quite limited. There are URLs which are already misidentified based on the the existing first Match Pattern. In fact, the workaround for getting GM to recognize a script that it currently does not is to add an additional fake parameter to the query string so the URL ends with The only way to be sure would be to add additional logic to test the URL in the
|
@makyen Ah, that all makes sense. |
An additional use case is installing GreaseMonkey scripts from private Github repos. In private repos, when viewing the 'Raw' of a file, Github appends a Example:
It would be great if this PR could be reviewed as it would allow querystring params. |
Since a few weeks, I have a similar issue with My silly page works like this (simplified):
This worked for a long time. Now there's a useless I could complain that it's a Firefox bug/feature, but I would like to recognize links with queries by |
Forms are not links. You're asking for that behavior. If you want a link, use a link (an A tag). |
Thank you for the answer, you are right, forms are not exactly links, only the action is. I hate to say it, but Tampermonkey and Violentmonkey acknowledge this. Two of the most annoying obstacles for everyday users are now occurring only with
This is so sad, I would like them to use |
This will allow users to host their script on more sites e.g. dropbox that generate links containing query. |
If the URL has a query string, Greasemonkey fails to detect it as a user script.
Use case:
Our team has some user scripts for working within our internal applications that we update periodically. We use Confluence to store the documentation and the userscript. Confluence automatically updates the link when a new version is made, but it does so by adding a query string for the version number of the file that is newest, e.g. https://localhost:8001/foo.user.js?version=4&apiversion=2
The text was updated successfully, but these errors were encountered: