Saturday, March 17, 2007

Greasemonkey 0.6.8: 'New Script...' UI now usable, error reporting improvements, new localizations

Download Greasemonkey 0.6.8.20070314.0

Note: Because addons.mozilla.org is in the midst of a migration to a new version of their software, Greasemonkey will not autoupdate itself until at least March 22, when we are told the new version of their server will up and running.

So if you want this version, you need to download it manually until then.

===

New stuff in this release. The major things are:

  • Rewrite of 'New Script...' UI. It now pops up a nice UI to get the script details and then generates and opens a script which is already installed that you can edit in one step. This is a huge improvement in the usability of this feature. Thanks to Anthony Lieuallen for the implementation.

  • Improvements to error reporting. Most types of errors in user scripts now give the correct line number in the error message. You can also click on the filename in Firebug to view the script, as with other types of errors in Firefox. Anthony is also responsible for this improvement.

  • Added support for overrideMimeType to GM_xmlhttpRequest. Thanks to Lior Zur for the patch. To use, add overrideMimeType: "yourmimetypehere" to the object you pass to GM_xmlhttpRequest.

  • New translations for Finnish, Japanese, and Russian. The Greasemonkey UI looks particularly cool in Japanese. Thanks to Tommi Rautava, Hisateru Tanaka, and Александр Соколов for their contributions.

To see the full list of changes in this release, see the commit history.

16 comments:

daniel Rozenberg said...

I've had a tiny problem with the overrideMimeType - It wasn't so clear to me that it expects a complete "Content-Type" string, so a request with
overrideMimeType:"iso-8859-8"
would return a textResponse encoded in utf-8, but a request with
overrideMimeType:"text/html; charset=iso-8859-8"
would return a textResponse encoded in iso-8859-8

I hope it was a little help for the needy :)

RichB said...

I've known about GreaseMonkey for a couple of years, but never bothered to install it or use it. Just today I had a bit of Javascript I wanted to install on every webpage so I decided to install GM and try it out. It's been a terrible experience so far. The Edit button doesn't work. GM doesn't support Javascript 1.7. Things seem to silently refuse to work.

I'm on a fairly standard WinXP/FF 2.0.0.3 machine. This is a real dissapointment.

boogs said...

It does have it's fair share of quirks, but I think once you get used to it, it's pretty fun.

Edit button: the first time you run it, it asks you what *editor* you want to use. Some people accidentally put the file they want to edit in there and GM does not recover from this very well. If this happened to you, go to about:config in the browser and find "greasemonkey.editor" and clear it. Then try again.

JavaScript 1.7: You are the first person to have asked for this. Didn't 1.7 come out fairly recently in Mozilla itself? I'll look into enabling it.

Failing silently: not sure what you mean here, but if you can provide more detail, I'll try and help.

There are some differences between web javascript and greasemonkey javascript unfortunately because of security. Have a look around the wiki for more information:

http://wiki.greasespot.net/XPCNativeWrapper

- a

Devon said...

I'm also seeing a silent failure in the form of the userscript installer's "Install" button.

Clicking it has no effect. Any suggestions on what to look for would be much appreciated.

I'm running 2.0.0.3 and 0.6.8.20070314.0

Devon said...

Addendum:

Looks like "New User Script" is similarly affected. Clicking the "Ok" button has no effect.

Devon said...

Ok, I did some digging and here's what I found:

#1 gm_scripts and gm_scripts/comfig.xml never got created in my profile. This caused an exception in Config.load().

Fixed by creating the gm_scripts directory and an empty config.xml.

This made the install button/menu work.

#2 I had a typo in the path to my editor. This caused another silent failure.

If fixed this by correcting my typo.

It would be nice if when editor.exists() or editor.isExecutable() fails openInEditor() would prompt for an editor rather than failing.

maros said...

I can't edit any script from GM interface, and also I can't add my own scripts to GM because the dialog box where opening the JS file won't open.

maros said...

Problem solved :)

Arthaey said...

I just installed the latest version of Greasemonkey on a fresh Ubuntu 6.10/Firefox 2.0.0.3 installation. When I click any of the userscripts.org "install this script" links, I just see the script source. I have no "install" button or popup available. How can I get the scripts to install?

gracefool said...

Thanks devon, once I created gm_scripts/comfig.xml greasemonkey started working.

Seems like this bug would be easy to fix... *nudges developers*

David said...

Trying to install GM from https://addons.mozilla.org/en-US/firefox/addon/748
into 2.0.0.3 and... it says it installs, it says, "Restart Firefox" and when the 'Fox returns, I have nothing. It's not even in my add-on list.

Help...?

Cannibal said...

Had the same problem as devon, fixed it by manually adding the gm_scripts directory and an empty config.xml . I'm using Mozilla/5.0 (Macintosh; U; Intel Mac OS X; it; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1

Jizzrazz said...

found and fixed...Just to let you no ... i went and installed greasemonkey then wen i went to restart i needed to update some of my other FF extensions... soo wen i did so greasemonkey didnt pop up .. had a look it said it could not work with FF(2.0.03)... to fix just reinstall greasemonkey.. Cheers for the program ... it bloody awesome :p

Oliver said...

Hello !
I would like to make you a small suggestion, that you offer easy to spot alternative download links for the greasemonkey install xpi. Today, addons.mozilla gives me a hash error so I cannot install the latest version, that's annoying, if you see the idea ;)

Cheers,
Oliver

kunaal said...

i am unable to install any new script s in firefox using greasemonkey,how can i do it?

Arthaey said...

As a follow-up to my comment on April 2nd: I had to downgrade to 0.6.7 to get it to work for me.