Chromium and Google Chrome convert User scripts into Chrome extensions since version 5.
A userscript's Metadata block is parsed, and a manifest file is created.
A copy of the user script is used as a content script.
To discern "real" Chrome extensions from converted user scripts, the
"converted_from_user_script" property is added.
Because of this distinction, converted user scripts have access to some GM_* methods.
User scripts in Chrome behave similar to ordinary Greasemonkey scripts, with some exceptions:
- Prior Chrome 13, GM_xmlhttpRequest did not allow cross-origin requests. Since version 13, this is possible, provided that the requested URL matches a @include or @match pattern.
unsafeWindowin the converted user script is not equivalent to Greasemonkey's unsafeWindow object. Content scripts in Chrome do not have a direct access to the page's global
windowobject (look here for more information).
- The only fully working API methods are: GM_addStyle, GM_xmlhttpRequest, GM_log and GM_openInTab.
- The following methods are defined, but not implemented (when they're called, a message is logged in the console): GM_getValue, GM_setValue, GM_registerMenuCommand.
- User scripts which implement persistency functions exist, but they cannot emulate the exact behaviour: Cookies, DOM Storage and such are domain-specific. Furthermore, the data is also readable by the page itself, which is a potential security leak.
See this blog post for some notes.
IEScripts is part of the IE7Pro add-on for Internet Explorer 6 and 7 only.
A directory of scripts is available at iescripts.org.
Section 5 of their tutorial is entitled "Porting from Firefox GreaseMonkey user scripts" and explains how to compensate for various differences.
Even minimal scripts are not immediately compatible between Greasemonkey and IEScripts since the latter uses the
.ieuser.js extension rather than
.user.js for user scripts; scripts must be renamed to be installed in the other user script engine.
.user.js extensions. Access to other Opera-specific functions is provided via a window.opera object.
https:). For Opera Mobile, navigate to the User Prefs section of
GreaseKit is a User script manager for Safari 4 for Mac. Unfortunately, GreaseKit removed all GM_* functions in version 1.4 (Possible workaround). The GM_addStyle and GM_log methods were re-added in version 1.7 though . The most recent version was released in 2008, so features which were introduced in Greasemonkey 0.9+ (such as @match) are not included.
English documentation (based on experience and the source code):
- Download the extension, and install it (by opening NinjaKit.safariextz file with Safari 5+).
- After installation, a new button appears at the left side of the location bar.
- To edit/delete/disable scripts, click on the button. User scripts can be managed at the Script tab.
- By clicking on any link which ends with
.user.js, the "Install Greasemonkey" dialog is triggered. These links have to be present when the document finishes loading.).
Without a user script approach, developers still can modify websites other ways:
- Use the browser's DOM Inspector. Firebug has a good tools for disabling or altering CSS/HTML elements.
- Use a full-fledged extension that serves the same purpose (see also docs for Firefox' Jetpack, Chrome, Safari, Opera, or cross-browser frameworks such as Kango).
- Use a local HTTP proxy that modifies the HTML, such as Proxomitron.
- iMacros for Firefox is a Firefox extension that allows the user to record and replay so called "Internet Macros" for web automation, web scraping or web testing.
- Stylish is a Firefox that allows for client-side manipulation of webpage content through Cascading Style Sheets.
- Firebug is a developers extension that allows arbitrary real time changes to a page's DOM
- Mason is a simple yet powerful system which can activate and interact before resources are even loaded. Requires knowledge of RegExp.