Posted on Tuesday 23 August 2005 - Popularity: 5%
User-Scripts are small JavaScripts you can use to enhance specific web-pages in your browser. You can use them to display additional content on websites you frequently use or to remove page elements, advertisement for example. Safari, Firefox and Opera can all use them in one-way or another. Opera can use them right out of the box, here’s a tutorial. Firefox has a popular extension called Greasemonkey to enable user-scripts. You can learn more about Greasmonkey by reading the online-book “Dive Into Greasemonkey“. And finally if you use Safari, there’s an ad-blocking plugin called PithHelmet that has rule files you can use for this task. Additionaly PithHelmet has the Machete, a webpage “inline-proxy” for extensive modifications.
The above links should give you enough informations to write your own scripts, but of course for a lot of sites there are already scripts for you to freely download and use. For Opera, have a look at UserJS.org, for Firefox Greasemonkey one of the sites you can find scripts is BlogMarks an other one is UserScript.org. Most scripts are compatible with both browsers, Opera and Firefox, so have a look at the other browsers script directories as well. Safari at the other hand doesn’t support XPath, so a lot of the Opera and Greasmonkey scripts are not compatible without a rewrite and I don’t know of any directories, so you better learn JavaScript if you want to use them.
Fredi












August 24th, 2005 at 8:10 pm
I didn’t know Safari could support user scripting, that’s pretty cool
The may be a few incompatabilities between the different browsers though. For example Opera provides additional features for user scripting such as before and after event handling and defineMagicFunction/defineMagicVariable. I’m not sure these are available in other browsers and if they were the syntax would be different since in Opera they are provided through the window.opera object. Equally there are features in Greasemonkey that are unavailable in Opera’s user Javascript. This page has some more details http://www.howtocreate.co.uk/operaStuff/userJavaScript.html
I’d be interested if this script works in Safari - http://www.moddular.org/log/css-inspector I heard there were some problems in it’s DOM support (especially preventDefault and stopPropagation for events) but I don’t know if these have been fixed by now
August 24th, 2005 at 8:32 pm
I didn’t know either and without Google I still would. Let’s hope some more learn about it so that Safari gets a great directory of user scripts as well.
Fredi
August 24th, 2005 at 8:40 pm
That would great, unfortunatly my budget request for a Mac was turned down so I’m left guessing a little bit about exactly what code will work. Though I’d be hopeful scripts that run in both Greasemonkey and Opera would have a good chance of working in Safari too without much modification