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_getResourceURL won't work for setting favicon #1955
Comments
The coment on the gist suggests it is this specific usage that is the problem? Can you confirm? |
No, even with changed code i still couldn't make it work on firefox/gm while it works just fine in chrome/tm :x |
Yes, I confirm this. It really does not work correctly. But it looks like a Firefox problem. I have the same problem with: Firefox 30.0 - 33.0a1 (2014-07-15, Nightly) |
Edited the subject. https://gist.github.com/arantius/195e4226fd7a8500cf4e
|
It was mistake on my part for not explicitly saying it. |
This ensures URIs containing reserved characters for URI components (like "#") are handled correctly. Previously, any modification to such an URI's hash would lead to mis-parsing of the resource name. One example where we don't fully control the URI's hash are favicons, which have their icon size appended to the hash. Fixes greasemonkey#1955.
Ventero@ca8de27 fixes this issue. As it turns out, Firefox doesn't always use the exact To fix this issue, we simply have to ignore URI's hash when parsing the resource name out of the URI. However, this would break resources with reservered characters in their name - so we have to use the encoded resource name in the URI's path instead, thus ensuring that any reserved characters are properly escaped. Strictly speaking, this is a backwards incompatible change that affects any script that uses a stored/pre-generated resource URI containing characters that are reserved in URI components (if there are even any scripts that do this). However, I'd argue that this isn't a big issue, as the documentation for (Edit: Pushed a new commit to fix a typo.) |
This ensures URIs containing reserved characters for URI components (like "#") are handled correctly. Previously, any modification to such an URI's hash would lead to mis-parsing of the resource name. One example where we don't fully control the URI's hash are favicons, which have their icon size appended to the hash. Fixes greasemonkey#1955.
When I install the test case script linked in the original description today, it appears to work. I see the favicon from the script on my tab. Can anyone confirm/refute? |
Curious, I don't get that with e10s on or off, in 41.0a1. |
Yes :-) I don't know why, but not confirmed on: I confirmed on: Can anyone confirm, please? |
Same machine, 38.0, no error (e10s off, not available yet in 38). |
I can confirm that it works just fine now on (as intended)
|
@vBm: Do you have any error in the console? |
None. |
It's strange. But thanks. |
On
But it continues to work. Oh I bet I know why. The code just did var mm = Cc["@mozilla.org/childprocessmessagemanager;1"]
.getService(Ci.nsISyncMessageSender); But this is the parent process, getting the image to go in the UI chrome. Or at least, why the error. Still unsure how the image then shows up in the tab though. |
Can I say again how much I hate e10s? It's so damn hard to work with. "Oh, J/K LOL that kind of message manager isn't the one I wanted this time! Sucks to be you!" |
I'm trying to replace existing
favicon
of a website with a custom one (so i can indicate that my script 'tweaked' the page)This is simple testcase. -> https://gist.github.com/vBm/85a254006b6182bb59ba
While this code works perfectly fine using chrome with tampermonkey, on firefox and GM it's not working.
Hope this is 'good' enough report to get it fixed. If you need more info, i'll be eager to provide it ASAP.
Thanks in advance.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0
GM 2.0
The text was updated successfully, but these errors were encountered: