Greasemonkey scripts stopped working after latest update
After updating to FF31, some of my Greasemonkey scripts stopped working or are working incorrectly. The same thing happens with the beta versions of FF. I'll need to degrade to FF30 as I have confirmations from other users of the same script that it works on FF30, so If someone could check what was changed in FF31 that prevents running those ones.
Thank you
Alla svar (16)
There are two places (that I am aware of) to see what was changed in Firefox 31. https://developer.mozilla.org/en-US/Firefox/Releases/31 https://www.mozilla.org/en-US/firefox/31.0/releasenotes/
Thanks, but I'm not a developer. I don't see there anything special. Something changed, I don't know what, but it bugged the scripts.
Many things were changed from v30 to v31 and I don't think it's possible to find the EXACT code that screwed up your Greasemonkey scripts without manually looking through the Firefox source code.
Ed, Aren't scripts the same as extensions? They have to be updated every 6 weeks on schedule with Firefox releases or else they go outdated and won't work? Or should they work regardless? I don't use Greasemonkey that often but when I did, none of my scripts would misbehave when going over from v28 -> v29 or even from night-to-night Nightly builds which is what I use as my daily.
Have you looked for a newer version of those GM scripts? Are you using GreaseMonkey v 2.1? https://github.com/greasemonkey/greasemonkey/issues?state=closed&milestone=57 https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/versions/ released on July 21 by the developer - but may not yet be available via automatic update from AMO
Also, since userscripts.org has shutdown, most of the GM scripts from there have been moved over here - http://www.webextender.net/
moses, Technically I suppose User Scripts are classified as "add-ons" being that they are shown in the Add-ons Manager tab, but I wouldn't call them "extensions" as they are dependent upon the user having Greasemonkey (or an off-shoot of GM) installed. Maybe an extension for an extension?
But then again, I think GM scripts do check for updates using the same mechanism as Extensions, Themes, and other "addons", but the "updates check" isn't routed thru AMO.
There was a bug in GM 2.0 related to to 'script updating'. https://github.com/greasemonkey/greasemonkey/issues/1938
Updated GM to 2.1 just now, same thing still happens. Scripts what I use haven't been updated for months, maybe years, and they worked till FF got updated to 31. They still work on Chrome and TamperMonkey. And they still work on FF30. Seems there is no other way than to revert to FF30. Hopefully someone finds what broke GM and scripts.
Did you check the Web Console or Browser Console (Firefox/Tools > Web Developer) for error messages?
Older user scripts do not meet some of the requirements of the updated GreaseMonkey. Most importantly, I suspect, is the requirement to declare the special GM functions that are used in the script. If you post the first few lines of the script's metadata block (especially name and namespace), it might be possible to give you a quick fix. Otherwise, you might need to find a substitute.
For advice on userscripts, now that userscripts.org is kaput, you can try these sites that have a number of active developers:
OpenUserJS: https://openuserjs.org/forum
Greasy Fork: https://greasyfork.org/forum/
Note: Much of the content of userscripts.org was captured and reposted here: http://userscripts-mirror.org/ so with the metadata information, I would be looking over there for the script. If you can track it down, that would be faster.
Ändrad
I found - http://yeti_c.co.uk/conquerClub - in the meta data of that script.
Searching for conquerClub I found 12 scripts here. http://www.webextender.net/scripts/search?q=conquerClub&submit=
But that yeti_c thing was there before GM2.1 and before FF31 and it worked good. Those you found are all the old scripts and I need only BOB to work.
This could be the problem section:
var oldHandleFrom = unsafeWindow.handleFrom; unsafeWindow.handleFrom = function(parameter) { oldHandleFrom(parameter); colourCodeDD(); };
Greasemonkey 2.0 requires a different method to change a function in a page. Recoding it is a little to technical for me on the first reading, but see:
- http://www.greasespot.net/2014/06/greasemonkey-20-release.html
- https://blog.mozilla.org/addons/2014/04/10/changes-to-unsafewindow-for-the-add-on-sdk/
Or as a workaround, you could try removing that section from the script. It appears to color code drop-downs, which might not be a critical feature for you. (If deleting it doesn't help, you can paste it back in.)
Removed that section, and now the thing partially works (it doesn't work but it doesn't bug the interface anymore though - and stats are not there)
Unfortunately, I don't think I can help much more with this script. You could try the two sites I mentioned above or maybe Conquer forums (assuming using the script is allowed).
The problem could be the usage of history.replaceState() or similar functions in the original page (not in the Greasemonkey script): https://github.com/greasemonkey/greasemonkey/issues/1970
As a workaround, you could try to adapt this "@run-at document-start" script to your pages (fill in the "@include https://your/page*"):
// ==UserScript== // @name Remove history.replaceState // @description Removes history.replaceState to work around https://github.com/greasemonkey/greasemonkey/issues/1970 // @include https://your/page*
// @version 1 // @grant none // @run-at document-start // ==/UserScript== history.replaceState = function(data, title, url) { console.log("caught history.replaceState(" + data + ", " + title + ", " + url + ")"); };
Still the original script is broken, even when this one is enabled.
Broken: http://i.imgur.com/6rqBGwc.png without script enabled: http://i.imgur.com/gIlKPAu.png