Cross-browser userscripting

From GreaseSpot

Jump to: navigation, search
User scripts can be used in other browsers than Firefox, but the scripting APIs and browser JavaScript support vary. This page documents differences in other environments as compared to Greasemonkey in Firefox.

Contents


[edit] Similar Userscript Systems

These are userscript systems which work similarly to Greasemonkey for other browsers. A well-written userscript can work in any of these environments.


[edit] Internet Explorer

See http://blog.jonudell.net/2007/04/23/greasemonkeying-with-ie/ for some notes.

[edit] IEScripts

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 UserScripts" 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.

[edit] Trixie

Trixie Homepage


[edit] Konqueror

[edit] GrimeApe

GrimeApe is provided through a proxy (ideally run on the user's local machine) which injects a few <SCRIPT> tags into web pages. These load Javascript which load up the relevant userscripts and provide a Greasemonkey-like interface. GrimeApe currently includes the Base2 JS library, which attempts to fix non-standards compliance for all browsers. It also runs fine in Firefox, but fails in IE5.

[edit] Opera User JavaScript

Opera User JavaScript is supported natively since Opera 8 beta 3. A directory of scripts is available at userjs.org.


[edit] Safari

WebKit-Browsers are partially supported via GreaseKit (Mac only). Unfortunately, GreaseKit removed all GM_* functions in version 1.4. Possible workaround


[edit] Alternatives

Without a userscript approach, developers still can modify websites other ways:

  • Enter javascript: URLs in the Location Bar or using bookmarklets.
  • Bookmarklets are javascript: URLs which have been bookmarked and can be very long. They can execute arbitrary JavaScript on any page, but they require a user to click them, rather than running automatically. They cannot make cross-domain XHRs, but they can preserve state via cookies, or by JSONP.
  • 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. (It is possible to convert much of the code in a GreaseMonkey script to become part of a Firefox extension. This is how GreaseMonkey scripters often "graduate" to extension writers.)
  • Use a local HTTP proxy that modifies the HTML, such as Proxomitron. (WebWasher was mentioned here but it appears to have been swallowed by McAfee.)

[edit] Related Software

See: http://en.wikipedia.org/wiki/List_of_augmented_browsing_software

[edit] Web Annotation

WebAnnotation is one of the things made possible by userscripts. Some applications concentrate purely on WebAnnotation and collaboration, for example SlideSpace, Diigo and Trailfire.

[edit] Firefox Extensions

  • AlchemyPoint combines a Firefox/Flock extension with a client side Proxy Server to allow for manipulation of web content, scraping of data from websites, detection/parsing of microformats, mashup etc.
  • Chickenfoot is a Firefox extension that aims to enable both end-user programmers and hackers to script interactions on the Web.
  • 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.
  • Platypus is a Firefox extension that lets you interactively modify any Web page from your browser, and optionally to save those transformations as a Greasemonkey script so that they'll be repeated the next time you visit the page.
  • Stylish is a Firefox extension 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
  • Bubbles is the first Site-Specific-Browser, and it uses JS injection of user-scripts, very much like Greasemonkey.
  • Jetpack allows users to write scripts which interact with the Firefox API, making them more powerful like extensions, for example by adding new GUI elements. Editing and testing of jetpacks can be done live.
  • Mason is a simple yet powerful system which can activate and interact before resources are even loaded. Requires knowledge of RegExp.

[edit] Proxy Level

  • Monkeygrease is a Java Servlet that alters the output of a closed-source Java web application before its output is sent to the client.
  • Proxomitron, available since late 1990s, predates JavaScript active browsing and provides a similar function for all browsers using a regexp-like matching language.
  • Proximodo, inspired by- and interoperable with proxomitron, is an open source, client side proxy server that allows page content manipulation.
  • Privoxy is an open source, client side proxy server that allows manipulation of page content available in many OS flavors.
  • MouseHole is a client side proxy server that allows manipulation of page content using Ruby.
  • Muffin is a Java open-source stand alone proxy server that allows manipulation of page content (usually client-side, but sports a web interface in addition to a Swing GUI for configuration).
  • BFilter is an open source, client side proxy server that allows manipulation of page content available in many OS flavors.
  • Scone is an open source stand alone proxy server (client and server side) that allows any manipulation of transferred web resources. It also provides an personal web crawler, user action logging as well as an mysql persistence component.
Personal tools