Having hearing about greasemonkey for a very long time, I finally decided to dive into it. Turns out its pretty cool - mainly because unlike what I had imagined, its very simple and not at all intrusive. But the only thing I didnt like about it was that there was no easy way of writing user scripts with JQuery.
To me this is a big deal since I just refuse to write any more javascript code with getElementsByClassName/ID/Name blah blah. JQuery makes code simple and helps test and debug the code very easily. After googling for a mod that allows using jquery in user scripts I came up with only a couple of promising leads - and they were not very seamless (see below). Hence I decided to modify the greasemonkey code to build jquery support myself.
Since greasemonkey is a very well written extension, this turned out to be failry simple. I have included the latest jquery.js in my mod and this file gets loaded into the runtime of all user scripts. (In future, I will be adding a directive in the user script which enables me to load jquery selectively). But for now this works beautifully! The result is Super GreaseMonkey that you can download below.
Usage: Just install this instead of the regular version of greasemonkey.
If you need a different version combination for any reason, feel free to
drop me a note at
Hopefully, someday soon this mod makes it into the official build!
Chop chop Dilbert gets rid of the banner ads and ugly nav bar, moves the main comic to the top of the page (so you dont have to scroll down to read sunday comics), remembers the comics you have already read and displays a link to the next unread comic at the top of the page. It also refreshes the page every 3 hours so I dont miss the next days comic.
Paypal Country Switcher adds a new link to the top of the paypal page to switch between 2 accounts in two different countries. I find it very useful since I keep switching between my US & Australian accounts. Additionally, it autologins into the correct account depending on which paypal site you navigate to.
Note: You should download this script and enter your paypal account information before installing the script.Both the above solution provide a skeleton code that needs to be included in every user script that needs jquery. The skeleton code loads the jquery via http: URL and user script needs to wait for this loading to complete before doing its stuff.
Obviously it seems like a stop gap solution by some helpful souls who, just like me desperately need the jquery support. However, loading external scripts is just not acceptable since it makes web browsing so much more slower, yeeks.
My plan is to add a lot of cool stuff to greasemonkey. Most importantly, ability to configure a user script with a simple form supporting script-defined variables. I think this is crucial to building reusable user scripts.
More coming soon.