# Greasemonkey: My favorite Firefox extension.

**URL:** <https://boards.straightdope.com/t/greasemonkey-my-favorite-firefox-extension/309877>\
**Category:** Miscellaneous and Personal Stuff I Must Share\
**Created:** [June 26, 2005, 3:57am UTC](https://boards.straightdope.com/t/greasemonkey-my-favorite-firefox-extension/309877 "2005-06-26T03:57:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [June 26, 2005, 3:57am UTC](https://boards.straightdope.com/t/greasemonkey-my-favorite-firefox-extension/309877/1 "2005-06-26T03:57:06Z")

</div>

[Get it now from Mozdev.](http://greasemonkey.mozdev.org/) You will not be disappointed.

I’ll let Mozdev explain what it does:

> [@](#):
>
> Greasemonkey is a Firefox extension which lets you to add bits of DHTML (“user scripts”) to any web page to change its behavior. In much the same way that user CSS lets you take control of a web page’s style, user scripts let you easily control any aspect of a web page’s design or interaction.

In case you aren’t a techie, that boils down to this: You can execute arbitrary JavaScript to modify any webpage any way you want. This is especially useful in removing ads even AdBlock can’t touch, but you can also make websites more useful in addition to simply being less annoying. [A case in point is the Google Butler, which includes links to other search sites and alters which font is used to display the page.](http://diveintomark.org/projects/butler/)

[This is a great webpage for user scripts, the extensions that Greasemonkey hooks into the browser itself.](http://dunck.us/collab/GreaseMonkeyUserScripts) It’s a long list broken down by which website the user script is aimed at, although many of them are general-purpose.

[_Dive into Greasemonkey_](http://diveintogreasemonkey.org/) isn’t the best introductory work I’ve ever read, but it does help you get your feet wet in writing your own user scripts. It is freely downloadable in HTML and PDF.

If you do want to write your own extensions, you will want [this JavaScript shell](http://www.squarefree.com/bookmarklets/webdevel.html) (implemented as an active bookmark written in JavaScript, a fact cool in and of itself). It actually gives you access to all of the bits on a webpage JavaScript programs can touch. It’s invaluable if you are using this as an excuse to learn JavaScript as well as extension-writing.

(Speaking of extensions, you can [compile Greasemonkey user scripts to standalone Firefox extensions.](http://www.letitblog.com/greasemonkey-compiler/) Which is nice because it’s a lot easier to write a user script than a full extension.)

[Greasemonkey is generating buzz.](http://www.mozillazine.org/talkback.html?article=6743) Some people dislike the level of control it gives users, apparently, but I think it’s long overdue.

So try it out and have fun.

---

<div class="post-metadata">

**Author:** ![HubZilla](https://avatars.discourse-cdn.com/v4/letter/h/ccd318/32.png) [@HubZilla](https://boards.straightdope.com/u/HubZilla)\
**Post date:** [June 26, 2005, 10:56am UTC](https://boards.straightdope.com/t/greasemonkey-my-favorite-firefox-extension/309877/2 "2005-06-26T10:56:39Z")

</div>

I salute you!

My favorite was [Adblock](http://www.extensionsmirror.nl/index.php?showtopic=774) , especially with a good [filter set](http://www.pierceive.com/filtersetg/). It pretty much erases every ad: from pop-ups to banner ads to noisy animated ads.

Now this one is my new toy! I love the Google Maps mouse-wheel zoom-in, the Google box in My Yahoo (my home page), and the one where it always remembers passwords! There’s just so much more to discover here!

---

<div class="post-metadata">

**Author:** ![HubZilla](https://avatars.discourse-cdn.com/v4/letter/h/ccd318/32.png) [@HubZilla](https://boards.straightdope.com/u/HubZilla)\
**Post date:** [June 26, 2005, 11:38am UTC](https://boards.straightdope.com/t/greasemonkey-my-favorite-firefox-extension/309877/3 "2005-06-26T11:38:05Z")

</div>

> [@Derleth](#):
>
> [A case in point is the Google Butler, which includes links to other search sites and alters which font is used to display the page.](http://diveintomark.org/projects/butler/)

I currently use [CustomizeGoogle](http://www.customizegoogle.com/), which is an extension more than a GreaseMonkey script. It is more customizable.

One thing I’ve always wanted to do was download imbedded video files, like trailers, etc. That long list had a user script “unembed” which took care of that!

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [June 26, 2005, 8:15pm UTC](https://boards.straightdope.com/t/greasemonkey-my-favorite-firefox-extension/309877/4 "2005-06-26T20:15:34Z")

</div>

**HubZilla** : Thank you for the Customize Google extension. I’ll have to look at it in more detail to determine if it can really replace Google Butler in my personal Firefox installation.

In case anyone is wondering what a user script looks like, here’s one I hacked up in a few minutes to remove ads from [thefreedictionary.com](http://thefreedictionary.com):

```auto

// ==UserScript==
// @name TheFreeDictionary Cleaner
// @namespace tag:havre.mt.us,2005-06-11:Barts
// @description Remove ads from thefreedictionary.com
// @include http://*.thefreedictionary.com*
// @include http://thefreedictionary.com*
// ==/UserScript==

var adRegion = document.getElementById('Ov');
if (adRegion) {
   adRegion.parentNode.removeChild(adRegion);
}

```

It turns out all ads are contained in ‘div’ tags with the id ‘Ov’. Removing those nodes has the effect of removing the ads.

This is about as simple as it gets. It’s a useful extension in four lines of code, counting the extra length added by my formatting. Greasemonkey is an extension writer’s dream.
