Monkeying around with Firefox

A script-manager for Fire Fox?.


Mozilla add-on page
Wikipedia:Greasemonkey - The weblog about Greasemonkey; rather low-volume -- usually updates.
GreaseMonkey wiki - in intermap as GreaseSpot: - repository to download and install Greasemonkey scripts.
GreaseMonkey-DEV google-group


Mark “Dive into X” Pilgrim’s GreaseMonkey Hacks as a wiki on O’Reilly commons
Dive Into Greasemonkey cc 2005 - the predecessor to the book

  • Avoid Common Pitfalls in Greasemonkey - follow-up article by Pilgrim; inside of the wiki, as well. Touches on security problems in pre 0.3 GM, and situations for GM coders to avoid/be aware of.



some history, relating to code internals -- see message-thread for more context


Greasefire: find greasemonkey scripts for your url


Stack Overflow questions


how to disable greasemonkey scripts on your site


“When Emacs and The Browser converge - firefox customizations via Greasemonkey... author compares Emacs’ extensibility to greasemonkeying w/ Firefox. from 2005


lots of interesting scripts to study from Arantius, creator of the GreaseMonkey#compiler



GM source at GitHub




GitHub home for GM development



Jquery in Greasemonkey, eh?

JQuery in Greasemonkey...
more jQuery in GreaseMonkey


see also: J Query



Auto-update scripts

I’ve never done any of this.... looks interesting, though
User Script Updates -- auto-updates GM scripts (haven’t tried)
userscripts discussion of various methods including MonkeyUpdater, which doesn’t require the script to be hosted at




GMail GreaseMonkey API from google-code
an experience



Compile GM-scripts into Firefox extensions

Compile GM scripts to FF extension - auto-create an XPI file
Lifehacker mentions the compiler and the author chimes in with background in the comments


NOTE: it seems that the compiler requires the foo.js file to end with a semi-colon (;), whether or not the code actually requires one (eg, ends with a function definition that ends with a curly-brace (})). ... Because it pulls in the script through an eval statement???


NOTE: there is an updated version of the xmlhttprequester in Grease Monkey proper, but the compiler has not been updated; I’ve got a patch from GM-captcha-scripter Shaun Friedle; need to add that in here, don’t think it’s been distributed....



as GM does, the compiler is evaluated inside a Sandbox.


A number of GM functions are replicated, but not all.


suported functions

sandbox.GM_addStyle=function(css) { \$shortname_gmCompiler.addStyle(sandbox.document, css) };
sandbox.GM_setValue=\$shortname_gmCompiler.hitch(storage, "setValue");
sandbox.GM_getValue=\$shortname_gmCompiler.hitch(storage, "getValue");
sandbox.GM_openInTab=\$shortname_gmCompiler.hitch(this, "openInTab", unsafeContentWin);
sandbox.GM_xmlhttpRequest=\$shortname_gmCompiler.hitch(xmlhttpRequester, "contentStartRequest"



unsupported functions





another Greasemonkey to XPI-plugin compiler (haven’t tried it, but doesn’t look as fully featured)
Gina Trapani’s multi-script compiler as used in the “Better Google” series




XML Path Language

W3 Xpath 1.0 standard
XPath and Xpointer -- O’Reilly wiki-book thing.


Using the Mozilla Javascript Interface to XPath
XPath tutorial
W3 schools XPath Introduction
Brian Donovan - Substituting XPath for DOM tree walking in Greasemonkey User Scripts
XPather -- firefox extension and documentation


Xpath 2.0 regular expressions



Converting to other platforms


Greasespot: cross-browser user-scripting





see Chrome#userScripts



IE turnabout
GreaseMonkey 4 IE(approve sites)



When do GM scripts run?

Grease Monkey’s scripts can run only when the DOM is already parsed (i.e. after page scripts already run).”


see discussion thread on runtime-comparison with NoScript




a greasemonkey-like extension
Chickenfoot home

LifeHacker plug



Passwords and encryption

(notes for a GM project)



Custom work for hire

Are you looking for a GreaseMonkey script for a particular purpose? You can hire me as a free-lancer to get it done!


What have I done? Other than build this page of resources that you’ve found, I used a greasemonkey-related engine to make SkipScreen, a top-25 Fire Fox extension that is used by over 400,000 people daily.



See Also

Java Script



Category tags

Programming javascript firefox browser