Updating to Firefox 4 broke my favorite Greasemonkey scripts! Is there any way to fix them?
After amassing a sizable collection of Greasemonkey userscripts on Firefox over the years, I found myself using the lightweight Google Chrome more and more, to the point that it became my de facto
default browser in 2010. Despite the switch, I was able to continue using most of my favorite userscripts thanks to the Blank Canvas Script Handler
extension, a Greasemonkey analog for Google Chrome (not all scripts were compatible, though).
After hearing about all the speed improvements and other goodies in Firefox 4, I decided to give Mozilla another shot. So yesterday I booted up Firefox 3.6 (the most recent version I had installed), downloaded a dozen or so extension updates that had long been pending (including Greasemonkey), then downloaded Firefox 4. Right off the bat, half my existing extensions were no longer compatible, so I spent some time removing the ones that were truly broken and doing everything else necessary to get the browser up to speed.
Anyway, I was glad to see that the updated version of Greasemonkey (0.9.1) was already compatible with Firefox 4, and even had its own custom "Userscripts" slot in the browser's new Add-ons Manager window. But after a few minutes of websurfing, I ran into a bunch of major issues.
Basically, a whole slew of userscripts just don't work anymore. This includes not only highly complex interactive scripts like YouTube Enhancer
and my precious Google Reader Preview
, but also dead-simple ones like Allow Snopes Text Selection
, which contains a grand total of four lines of code
And yet, some other scripts do
work, including Greased Lightbox
and Plutor's fairly sophisticated Mefiquote
. So it's not simply a matter of Greasemonkey not working -- something is interfering with individual userscripts.
Because I updated Firefox, Greasemonkey, and a bunch of other add-ons all at once after months of neglect, I wasn't sure what particular change was causing the problem. So I did some testing on another computer that also had Firefox 3.6. The scripts worked under version 3.6, and continued to work after I updated to the latest version of Greasemonkey. But as soon as I installed Firefox 4, the same scripts quit functioning.
So, what gives? Greasemonkey interacts directly with a page's source code, and that should be the same across all browsers, right? So why is Firefox 4 interfering? Upgrading has never messed with my userscripts before. And why only some scripts, including extremely simple ones, but not others? And for the programmatically-inclined: looking at the source code for these scripts (especially Google Reader Preview), is there anything that can be tweaked to make them work again? I'd wait for the script authors to update them, but many have been abandoned for months or years...