| This article needs additional citations for verification. Please help improve this article by adding reliable references. Unsourced material may be challenged and removed. (August 2008) |
| Design by | Aaron Boodman |
|---|---|
| Latest release | 0.8.20080609.0 / 2008-06-12 |
| OS | Cross-platform |
| Available in | English |
| Type | Mozilla extension |
| License | Expat License |
| Website | www.greasespot.net/ |
| Mozilla Firefox (category) |
|---|
| Contents |
| Origins and Lineage |
|
|
Greasemonkey is a Mozilla Firefox extension that allows users to install scripts that make on-the-fly changes to most HTML-based web pages. As Greasemonkey scripts are persistent, the changes made to the web pages are executed every time the page is opened, making them effectively permanent for the user running the script.
Greasemonkey can be used for adding new functions to web pages (for example, embedding price comparison in Amazon.com web pages), fixing rendering bugs, combining data from multiple webpages, and numerous other purposes. Well-written Greasemonkey scripts can integrate changes so well that their additions appear to be natural parts of the web page.
Contents |
Most Greasemonkey user scripts are written by hand, using site-specific JavaScript code that manipulates the contents of a web page using the Document Object Model interface. userscripts.org maintains a database of Greasemonkey scripts, and for each it lists the URLs of web pages to which the scripts pertain. When the user loads a matching page, Greasemonkey invokes the relevant scripts, which can then add to the page, delete parts of it, or move parts around. Greasemonkey scripts can also poll external HTTP resources via a non-domain-restricted XMLHTTP request. Greasemonkey scripts are named somename.user.js, and Greasemonkey automatically detects and offers to install any such script, when a URL ending in that suffix is loaded. In addition to JavaScript code, Greasemonkey scripts contain limited optional metadata, which specifies the name of the script, a description, a namespace URL used to differentiate identically named scripts, and URL patterns for which the script is intended to be invoked or not.
Writing a Greasemonkey script is similar to writing JavaScript for a web page, with some additional restrictions imposed by the security provisions of Mozilla's XPCNativeWrappers. Compared to writing a full-fledged Firefox extension, user scripting is a very modest step up in complexity from basic web programming, but for the JavaScript illiterate and non-programmer incapable of writing a user script, the Platypus [1] extension allows them to edit a page (deleting or moving parts of it around as well as changing typeface and colors of elements on the page) to create persistent Greasemonkey scripts automating their changes.
Users have written scripts that:
| It has been suggested that it may be better to integrate the information in this article's Criticism or Controversy section(s) into the article as a whole to achieve a more neutral presentation. (Discuss) (2008-03-22) |
| This article or section contains weasel words, vague phrasing that often accompanies biased or unverifiable information. Such statements should be clarified or removed. |
| The neutrality of this article is disputed. Please see the discussion on the talk page. (May 2008) Please do not remove this message until the dispute is resolved. |
Some in the Firefox community, and a number of technical analysts, warn that widespread use of Greasemonkey and related user scripting technologies will require care in deployment. Their concerns include:
swliveconnect=true attribute, enabling you to modify variables in the Flash file.[2]Greasemonkey is available for Firefox, Flock and Epiphany. The Epiphany Greasemonkey extension is part of the Epiphany-extensions package. However, this extension is not fully compatible as of release 2.15.1, since some Greasemonkey API functions (e.g. GM_getValue) are unsupported. There are also custom versions for SeaMonkey[3] and Songbird.[4]
Version 8 and upwards of Opera also have user scripting functionality. Both Opera and Firefox support the W3C DOM. Opera is capable of running many Greasemonkey user scripts.[5]
GreaseKit (formerly Creammonkey) and PithHelmet (shareware) are similar tools for the MacOS version of the Safari browser, along with other WebKit based applications such as MailPlane.
Konqueror Userscript is a webpage manipulation tool for KDE's Konqueror browser that aims for compatibility with Greasemonkey scripts and metadata. It is available as a KPart.
For Internet Explorer, similar function is offered by IE7pro, iMacros, Trixie (last updated 2005), Turnabout (last updated 2006) and Greasemonkey for IE (last updated 2006). Turnabout used to be open source software (under the BSD License), but as of September 2006, the source code is no longer available.
Currently (as of 2008 Nov) there is only limited support for Greasemonkey scripts in Chrome beta (since build 3499).[6] It's disabled by default, but can be enabled by adding --enable-greasemonkey as a startup parameter. As there is currently no method to load scripts within Chrome, scripts must be placed into the C:\scripts directory. Also @include metadata within the scripts is ignored and they are executed for all domains/pages.
Without an extension like Greasemonkey, developers still can modify websites other ways:
| This article includes a list of references or external links, but its sources remain unclear because it lacks inline citations. Please improve this article by introducing more precise citations where appropriate. (August 2008) |
No comments have been added.