Skip to content
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

@Match problem (not ports) #2715

Closed
Owyn opened this issue Nov 20, 2017 · 5 comments · Fixed by #2732
Closed

@Match problem (not ports) #2715

Owyn opened this issue Nov 20, 2017 · 5 comments · Fixed by #2732
Milestone

Comments

@Owyn
Copy link

Owyn commented Nov 20, 2017

Just noticeed that after migration to new FF and GM4 my match:
// @match *://*.gelbooru.com/index.php?page=post&s=view&id=*
no longer fires on url (example)
https://gelbooru.com/index.php?page=post&s=view&id=2865115

while simple // @match *://*.gelbooru.com/*
fires on that url

was working perfectly in GM3, but in GM4 it has this weird bug...

whole script if you wonder: https://github.com/Owyn/HandyImage/raw/master/HandyImage.user.js

@arantius arantius added this to the 4.1 milestone Nov 21, 2017
@arantius
Copy link
Collaborator

Ok inside MatchPattern.doMatch we're doing this._pathExpr.test(url.pathname) but pathname is just /index.php. We need to test this._pathExpr.test(url.pathname + url.search).

@NoneGiven
Copy link
Contributor

NoneGiven commented Nov 21, 2017

Also, a @match like this:

// @match https://example.com/path

Will fire on a page like this:

https://example.com/path?query=whatever

Based on your explanation, this would be fixed with the same code change. Just documenting it anyway.

@tobbexiv
Copy link
Contributor

This is due to the same matching issue arantius explained. Everything of the search query is not considered in the matching. In your case it is ?query=whatever what is ignored at all.

@arantius
Copy link
Collaborator

arantius commented Dec 5, 2017

This fix should be in 4.1beta6; testing and confirming this would be very appreciated!

https://addons.mozilla.org/firefox/downloads/file/800957/greasemonkey-4.1beta6-an+fx.xpi?src=devhub

@NoneGiven
Copy link
Contributor

@arantius Seeing my query string matching scripts run where they're supposed to now in FF 57 (well, except for in frames).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants