Monday, June 27, 2005

Will there ever be another Greasemonkey version?

Slightly longer answer: sometime soon. Jeremy and I have been working on a refactor of Greasemonkey that we hope will make it easier to maintain and to add features to.

This was mostly my idea, Jeremy just wanted to get the next version out. So blame me, I am weak :-). I just got tired of looking at the really, really bad "my-first-extension" Greasemonkey codebase.

What you'll get out of the deal:

A "new" button in the manage UI

Compatibility with latest Deer Park builds

Compatibility with Seamonkey

Compatibility with Menu Editor (but not Compact Menu probably)

Less of a chance of being detected or stopped by page authors

Minor UI improvements, such as being able to press Enter/Esc in the various dialogs

Easier development of future features

No more memory leaks

Accelerator keys for menu commands

This one bit is actually the difficult point. There is this known bug in XUL where event handlers for menu items are lost when the nodes they are attached to are removed from the DOM. To get around this, we previously wrote the feature to rebuild the User script commands menu item whenever the Tools menu was activated.

However, since registered menu items' commands need to be active immediately and cannot wait for the Tools menu to be shown, this approach will no longer work. The only solution we have been able to come up with so far seems to crash Firefox for unknown reasons.

We'll work on this a little longer, but if no solution presents itself, we may need to ditch accelerator keys temporarily until we understand better what is causing this problem. We'll work on it for another week at the most.

But hey! Userscript.org is very close to being real! That's cool, right? We have hosting with TextDrive all set up and we just need to put the code up there and turn it on and we'll be ready to roll. W00t!

Very sorry for the delay on the next version. Hang in there, monkeyers.

I feel responsible for the lateness of this release, since I was the one pushing for keyboard shortcuts for userscript-originated menu items. I say push it to the next release, and get this puppy out the door.

Martin Packer from IBM here (who couldn't be bothered to get a blogger ID). :-)

I'm a recent user of greasemonkey (and I love it and am blogging about it within IBM). One thing I'd like to see, perhaps in this new release, is a way PROGRAMMATICALLY to install or deinstall a script.

I'm thinking of how one could write installation scripts.

Does this seem feasible? And if I've missed a pre-existing function that's cool, too.

First, you don't need a Blogger ID to comment with your identity. Just select the "other" radio button and type in your name and URL.

Second, yeah, you're not the first person to ask for this. Would you want to do it from another extension? From another program on the same machine?

If you just need to install copies of Firefox with Greasemonkey and certain scripts preinstalled, you don't need what you describe to do it. Just install a preset scripts/ directory into the right place in the profile.

Actually I'm more highlighting a "mass acceptance" thing, rather than pointing to a specific "cure". As we (in IBM) write scripts we would like to have them available to lots of non-technical people. (Or at any rate non-GMers.) So I'd encourage you to think about how to make it easier to automate script installation and maintenance.

While we might ship Firefox to our employees with GM and a set of scripts installed there's the other case to think about: I write an internal page prettifier and want to share it with colleagues. For mass adoption it ought to be easier than it is today. For instance I should be able to point them to a button a web page that runs javascript to install / upgrade / deinstall my script.

This may be outside of the scope of greasemonkey, but it would be really cool if you could make is so that css code can be installed into the usercontent.css / userchrome.css files in the profile folder.

This would mean that people could install skins for themes easily into userchrome.css and change the css of webpages using usercontent.css . An example of such css that I did can be seen here - http://forums.mozillazine.org/viewtopic.php?t=286866

To me, this makes more sense that using Javascript to insert css into the html and it has the advantage of being applied before the page renders.

I also think it would be a great addition to your forthcoming scripts website to also be able to have these css files offering even more customising opportunities.

At the end of the day, it's all about lowering the barrier to entry for users, especially with Greasemonkey being already widely used.

Maybe it would have been better to push out another release with support for Deer Park 1 (so that people would not have to be forced to choose between GM and DP), and then do your refactoring/cleanups/whatever.

I tried a couple versions GM from CVS floating on the web which were supposed to fix Deer Park compatibility, but they all failed miserably (completely non-functional, and with missing button labels in the script manager).

P.S. I finally was able to make version 0.3.3 work with Deer Park by adding my scripts manually in the extension directory, and creating the config.xml by hand, but some scripts are still flaky, i.e. they don't seem to trigger always, sometimes I have to refresh the site a couple of times.

OK, I decided to give CVS another go, and what do I see? I didn't even have to build the package from source, there is already a 0.3.4 XPI in the downloads/ directory!

I tried it, it fixes compatibility problems with Deer Park, and seems to work just fine in general.

So, why does the website still say 0.3.3 is latest?! You go to all this trouble to develop this great extension, and then you don't even bother to update your website? How are people supposed to know that there is a new version? I'm not being ungrateful here, I just don't understand that mindset.

I'm glad the Greasemonkey 0.3.4 you found in the downloads directory works for you.

The reason we didn't put it on the site is that it was never really tested. This was an interim build that was floated on the mailing list but never put through it's paces at all. It was also lacking many of the features intended for the next Greasemonkey version. You could think of it as a "nightly" in Mozilla nomenclature. It's great that it works, but basically dumb luck.

anonymous #1: Compact Menu compat isn't a priority for anyone who works on GM and those who looked at doing it found that it would be very difficult due to the way that CM is implemented. If you have an interest in doing this, feel free to submit a patch against the latest CVS.

Under Firefox's Tools menu, greasemonkey adds install user script/manage userscript/userscript commands. I'd like those three to be replaced by a single greasemonkey entry that can branch out into those three.

>This may be outside of the scope of >greasemonkey, but it would be really >cool if you could make is so that css >code can be installed into the >usercontent.css / userchrome.css >files in the profile folder.

heh i felt the sameway so i wrote a greasemonkey script a file ago that did just this (well injects personal css into webpages)

Terrific blog. I search the internet everytime Iget a moment to find blogs. Its better than cold icedtea and I have to visit it one more time!Please examine my city elizabeth in job pharmacy blog as soon as you can.

Delightful blog. I devote my spare time justlooking for great blogs such as yours. I treasure thissite and will go back!It may look like it was hard work, but my advance cash settlement blog was simple.

Captivating blog. I love surfing the web for thetype of blogs that you do. It had me on the edge of myseat and I kept going back to again and again!Once you sign on, check for my cash advance company loan blog.

Hey, you have a great blog here! I'm definitely going to bookmark you!I have a **ebooks** site/blog. It pretty much covers ebook/info/money making related stuff.Come and check it out if you get time :-)

Hey, I saw your blog and thought it was great. I thought you might want to look at some great Home Business Resource. There's a lot of buzz about the new Home Business Resource and maybe some of your readers will want to know. Best wishes to you.

It's nice to see a blog that is worked regularly...Keep up the good work!If you ever need content, browse of site at http://olin.tk . We also have our official company blog at http://olinepublishing.blogspot.com You are invited to use material from either.book

Speaking of directories, has anyone headr about the new political search directory out now? It is pretty much open to just about any category as far as I could tell and free to submit to. http://www.conservafind.com

I enjoyed reading your blog. There is a lot of useful information about design hosting prestonswebhosting.com web web in it. We offer Turnkey Websites and Reliable Hosting. We also provide a blogging service that will help your site get indexed fast and keep the search engines visiting your site. Click here for more information about design hosting prestonswebhosting.com web web.Thank youTWP Admin