Greasemonkey

Last updated

Greasemonkey
Original author(s) Aaron Boodman
Developer(s) Anthony Lieuallen, Johan Sundström, [1] 13 more [2]
Initial release28 March 2005;18 years ago (2005-03-28) [3]
Stable release
4.11 / 27 January 2021;3 years ago (2021-01-27)
Repository
Written in JavaScript, XUL, CSS
Operating system Cross-platform
Available inEnglish
Type Mozilla extension
License MIT License
Website www.greasespot.net

Greasemonkey is a userscript manager made available as a Mozilla Firefox extension. It enables users to install scripts that make on-the-fly changes to web page content after or before the page is loaded in the browser (also known as augmented browsing).

Contents

The changes made to the web pages are executed every time the page is viewed, making them effectively permanent for the user running the script.

Greasemonkey can be used for customizing page appearance, adding new functions to web pages (for example, embedding price comparisons within shopping sites), fixing rendering bugs, combining data from multiple web pages, and numerous other purposes.

History

The Greasemonkey project began 28 November 2004, written by Aaron Boodman. [4] [5] [6] Boodman was inspired to write Greasemonkey after looking at a Firefox extension designed to clean up the interface of AllMusic, [7] written by Adrian Holovaty, who later became a userscript developer. By May 2005, there were approximately 60 general and 115 site-specific userscripts distributed for Greasemonkey. [7] In July 2005, serious vulnerabilities were found in Greasemonkey by Mark Pilgrim, [8] [9] and fixed in the 3.5 version of Greasemonkey. [10] During this time, a Greasemonkey compiler was also developed for converting a userscript into a standalone Firefox extension. [11] Greasemonkey was initially met with complaints by publishers for its ability to block ads. [12] However, this criticism shifted its focus to other addons starting with the 2006 release of Adblock Plus.

Userscripts.org

To accommodate the growing number of scripts, userscripts.org was founded by Britt Selvitelle and other members of the Greasemonkey community in late 2005. Userscripts.org was open sourced in 2007 but the site later moved away from this code base. [13] As the main script repository listed on Greasemonkey's official site, userscripts.org accumulated thousands of scripts per year.

In 2010, the last known admin Jesse Andrews posted that the site was in maintenance mode due to lack of time and asked for a new maintainer to volunteer. [14] Nevertheless, he remained the sole admin of the site until a discussion about install counts began on 1 April 2013. [15] Prior to this, many of the "most popular scripts" as listed by the site had nominal install counts of zero. Over the following year spam scripts became more common, server downtime increased and the install count bug remained. [16] With no further communication by Andrews, userscript writers described the site as neglected and the official Greasemonkey site removed its front page link. [17] [18] In response, script writers and other developers began working on the fork "openuserjs.org", [19] [20] and later greasyfork.org, [21] as an immediate replacement. [22]

In May 2014, userscripts.org became inaccessible on port 80, prompting users to access it on port 8080 instead. [16] In August 2014, the site was shut down completely. Most of its scripts were backed up to the static mirror userscripts-mirror.org where they can now be found. [16]

Technical details

Greasemonkey user scripts are written in JavaScript and manipulate the contents of a web page using the Document Object Model interface. Scripts are generally written to be either page-specific or domain-specific (applying to all pages within a domain) but may also be tagged to apply to all domains for global browser enhancements. Users of Greasemonkey can write or download scripts and save them to their own personal library. When users visit a website matching a script in their personal script library, Greasemonkey invokes the relevant scripts.

Greasemonkey scripts can modify a webpage in any way that JavaScript allows, with certain Greasemonkey security restrictions. Scripts can also access other web pages and web services via a non-domain-restricted XMLHTTP request, allowing external content to be merged with the original page content.

Scripts are named somename.user.js, and Greasemonkey offers to install any such script when a URL ending in that suffix is requested. Greasemonkey scripts contain metadata which specifies the name of the script, a description, resources required by the script, 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 allowances such as cross-site XMLHttpRequests. Compared to writing a full-fledged Firefox extension, user scripting is a very modest step up in complexity from basic web programming. However, Greasemonkey scripts are limited due to security restrictions imposed by Mozilla's XPCNativeWrappers [23] For example, Greasemonkey scripts do not have access to many of Firefox's components, such as the download manager, I/O processes or its main toolbars. Additionally, Greasemonkey scripts run per instance of a matching webpage. Because of this, managing lists of items globally is difficult. However, script writers have been using cookies and Greasemonkey even offers APIs such as GM_getValue and GM_setValue to overcome this.

User scripts

File hosting servers for Greasemonkey require that the URLs for the scripts end with .user.js and not with a MIME type like text/html. Support for HTTPS will meet with[ clarification needed ] Greasemonkey's built in update checker. As of July 2019, the Greasemonkey project lists three recommended user script hostings: [24]

Compatibility

Greasemonkey is available for Firefox, Flock, and GNOME Web (formerly called Epiphany). The Greasemonkey extension for Web is part of the Web 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, [25] [26] Songbird, [27] Pale Moon, [28] qutebrowser, [29] and Falkon browser.

See also

Related Research Articles

<span class="mw-page-title-main">Bookmarklet</span> Web browser bookmark containing JavaScript code

A bookmarklet is a bookmark stored in a web browser that contains JavaScript commands that add new features to the browser. They are stored as the URL of a bookmark in a web browser or as a hyperlink on a web page. Bookmarklets are usually small snippets of JavaScript executed when user clicks on them. When clicked, bookmarklets can perform a wide variety of operations, such as running a search query from selected text or extracting data from a table.

<span class="mw-page-title-main">SpiderMonkey</span> JavaScript and WebAssembly engine maintained by the Mozilla Foundation

SpiderMonkey is an open-source JavaScript and WebAssembly engine by the Mozilla Foundation.

This is a comparison of both historical and current web browsers based on developer, engine, platform(s), releases, license, and cost.

Mozilla Firefox has features which distinguish it from other web browsers, such as Google Chrome, Safari, and Microsoft Edge.

Ajax is a set of web development techniques that uses various web technologies on the client-side to create asynchronous web applications. With Ajax, web applications can send and retrieve data from a server asynchronously without interfering with the display and behaviour of the existing page. By decoupling the data interchange layer from the presentation layer, Ajax allows web pages and, by extension, web applications, to change content dynamically without the need to reload the entire page. In practice, modern implementations commonly utilize JSON instead of XML.

Flashblock is a discontinued Flash content-filtering Firefox extension for Mozilla Firefox and SeaMonkey.

IE7Pro is an add-on for Internet Explorer 6, 7, and 8 that aims to enhance the feature set provided by the browser. IE7Pro adds features such as tab enhancement, an ad blocker and flash blocker, mouse gestures, inline search, privacy enhancements, online bookmark service, Greasemonkey-like user script support, and plug-in support. IE7Pro is available in several languages – this is made possible by user translations.

<span class="mw-page-title-main">Stylish</span> User style manager

Stylish is a user style manager that can change the appearance of web pages in a user's browser without changing their content by including user-supplied CSS style sheets with those supplied by the web site itself. The Stylish browser extension includes tools with which to write user styles, and can install user styles written by other Stylish users from a companion website. These user styles may be more or less selective, targeting just one web page, or all of the pages on a domain, or every page on the web.

<span class="mw-page-title-main">Firefox 2</span> 2006 web browser

Mozilla Firefox 2 is a version of Firefox, a web browser released on October 24, 2006 by the Mozilla Corporation.

The Mozilla Archive Format (MAFF) is a legacy Web archive file format that was provided by Firefox through an extension, used to store one or more web pages with their associated audio, video, and other related web resources to a single file. Unlike MHTML, which uses MIME encoding within a single HTML file, MAFF compresses the page into a ZIP container file.

A userscript is a program, usually written in JavaScript, for modifying web pages to augment browsing. Uses include adding shortcut buttons and keyboard shortcuts, controlling playback speeds, adding features to sites, and enhancing the browsing history.

Cross-site request forgery, also known as one-click attack or session riding and abbreviated as CSRF or XSRF, is a type of malicious exploit of a website or web application where unauthorized commands are submitted from a user that the web application trusts. There are many ways in which a malicious website can transmit such commands; specially-crafted image tags, hidden forms, and JavaScript fetch or XMLHttpRequests, for example, can all work without the user's interaction or even knowledge. Unlike cross-site scripting (XSS), which exploits the trust a user has for a particular site, CSRF exploits the trust that a site has in a user's browser. In a CSRF attack, an innocent end user is tricked by an attacker into submitting a web request that they did not intend. This may cause actions to be performed on the website that can include inadvertent client or server data leakage, change of session state, or manipulation of an end user's account.

<span class="mw-page-title-main">Pale Moon</span> Open-source web browser with an emphasis on customization

Pale Moon is an open-source web browser with an emphasis on customization; its motto is "Your browser, Your way". There are official releases for Microsoft Windows, FreeBSD, macOS, and Linux, as well as contributed builds for various platforms.

A lightweight web browser is a web browser that sacrifices some of the features of a mainstream web browser in order to reduce the consumption of system resources, and especially to minimize the memory footprint.

Content Security Policy (CSP) is a computer security standard introduced to prevent cross-site scripting (XSS), clickjacking and other code injection attacks resulting from execution of malicious content in the trusted web page context. It is a Candidate Recommendation of the W3C working group on Web Application Security, widely supported by modern web browsers. CSP provides a standard method for website owners to declare approved origins of content that browsers should be allowed to load on that website—covered types are JavaScript, CSS, HTML frames, web workers, fonts, images, embeddable objects such as Java applets, ActiveX, audio and video files, and other HTML5 features.

Mozilla is a free software community founded in 1998 by members of Netscape. The Mozilla community uses, develops, publishes and supports Mozilla products, thereby promoting exclusively free software and open standards, with only minor exceptions. The community is supported institutionally by the non-profit Mozilla Foundation and its tax-paying subsidiary, the Mozilla Corporation.

uBlock Origin Web browser extension

uBlock Origin is a free and open-source browser extension for content filtering, including ad blocking. The extension is available for Chrome, Chromium, Edge, Firefox, Brave, Opera, Pale Moon, as well as versions of Safari prior to 13. uBlock Origin has received praise from technology websites and is reported to be much less memory-intensive than other extensions with similar functionality. uBlock Origin's stated purpose is to give users the means to enforce their own (content-filtering) choices.

qutebrowser Free keyboard-focused web browser with a minimal GUI

qutebrowser is a QtWebEngine web browser for Linux, Windows, and macOS operating systems with Vim-style key bindings and a minimal GUI. It is keyboard-driven and is inspired by similar software such as Vimperator and dwb. It uses DuckDuckGo as the default search engine. qutebrowser is included in the native repositories of Linux distributions such as Fedora and Arch Linux. qutebrowser is developed by Florian Bruhin, for which he received a CH Open Source award in 2016.

A userscript manager is a type of browser extension and augmented browsing technology that provides a user interface to manage userscripts. The main purpose of a userscript manager is to execute scripts on webpages as they are loaded. The most common operations performed by a userscript manager include creating, installing, organizing, deleting and editing scripts, as well as modifying script permissions.

Tampermonkey is a closed-source donationware userscript manager that is available as a browser extension. This software enables the user to add and use userscripts, which are JavaScript programs that can be used to modify web pages.

References

  1. boots (23 August 2009). "Greasespot: Outie". Greasespot.
  2. "The greasemonkey network graph". GitHub .
  3. "Version history – GreaseSpot Wiki". wiki.greasespot.net.
  4. "Greasemonkey Project Info". Archived from the original on 25 March 2012. Retrieved 31 August 2011.
  5. Pilgrim, Mark (2005). Greasemonkey Hacks. O'Reilly. ISBN   978-0-596-55357-9.
  6. Boodman, Aaron (1 February 2010). "40,000 More Extensions!". Chromium Blog. Retrieved 5 March 2023.
  7. 1 2 Singel, Ryan (17 May 2005). "Firefox Users Monkey With the Web?". Wired magazine.
  8. "[Greasemonkey] greasemonkey for secure data over insecure networks / Sites". Archived from the original on 3 March 2020. Retrieved 24 February 2021.
  9. "Security [LWN.net]".
  10. "mozdev.org – : /pipermail/greasemonkey/2005-July/004379". mozdev.org. Archived from the original on 29 July 2005.
  11. Nivi (8 May 2005). "Greasemonkey will blow up business models (as well as your mind)". Archived from the original on 3 June 2006. Retrieved 22 July 2010.
  12. Festa, Paul (24 March 2005). "Firefox add-on lets surfers tweak sites, but is it safe?". CNET.
  13. Selvitelle, Britt (3 January 2007). "Userscripts.org... Opensource!". Archived from the original on 17 January 2007. Retrieved 21 May 2014.
  14. "Passing the torch on userscripts.org". Hacker News. 2010. Retrieved 24 October 2014.
  15. "Fixing Install Counts". 1 April 2013. Archived from the original on 3 November 2013. Retrieved 21 May 2014.
  16. 1 2 3 Brinkmann, Martin (9 May 2014). "Userscripts.org down for good? Here are alternatives" . Retrieved 21 May 2014.
  17. "User Script Hosting". 16 May 2014. Retrieved 21 May 2014.
  18. "Please change the official userscript site". greasemonkey-dev (Mailing list). 21 April 2014. Retrieved 21 May 2014.
  19. 1 2 "OpenUserJS". openuserjs.org.
  20. 1 2 "Fixing Install Counts – Page 6". 1 April 2013. Archived from the original on 3 November 2013. Retrieved 5 November 2015.
  21. 1 2 "Greasy Fork". greasyfork.org.
  22. Barnabe, Jason (19 February 2014). "Introducing Greasy Fork – a user scripts site" . Retrieved 5 November 2015.
  23. "XPCNativeWrapper – MDC Docs". Archived from the original on 28 June 2011. Retrieved 16 March 2011.
  24. "User Script Hosting – GreaseSpot Wiki". wiki.greasespot.net. Retrieved 22 July 2019.
  25. "Greasemonkey". mozdev.org. mozdev. Archived from the original on 23 April 2015. Retrieved 5 May 2009.
  26. "Greasemonkey Port for SeaMonkey – About – OpenUserJS". openuserjs.org.
  27. ianloic. "Greasemonkey". Songbird. Archived from the original on 2 June 2008. Retrieved 5 May 2009.
  28. "janekptacijarabaci/greasemonkey". GitHub. Retrieved 23 March 2020.
  29. "Improvements for GreaseMonkey support · Issue #3238 · qutebrowser/qutebrowser". GitHub. Retrieved 19 May 2020.

Commons-logo.svg Media related to Greasemonkey at Wikimedia Commons