[Greasemonkey] userjs.org

Arve Bersvendsen arve.bersvendsen at gmail.com
Thu May 12 01:27:08 EDT 2005


On Thu, 12 May 2005 00:06:51 +0200, <pilgrim at gmail.com> wrote:

> On 5/10/05, Jeremy Dunck <jdunck at gmail.com> wrote:
>> http://virtuelvis.com/archives/2005/04/userjs-org
>
> "User JavaScripts should ideally be written specifically for Opera"
>
> What an ass.

Well, thank you for your kind words. Now allow me to elaborate, and clear  
one thing up:

There are features in Greasemonkey/Firefox that Opera doesn't handle  
terribly well:

* DOM 2 Style
* XPath
* Mozilla proprietary CSS extensions
* XMLHTTPRequest. While this is supported by Opera, it is disabled in User  
JavaScript.

On the other hand, Opera has a feature set that gives entirely different  
possibilites:

* Magic variables and functions
* The window.opera.addEventListener:
** BeforeScript: Detects that a script included on a page is about to be  
interpreted.
** BeforeExternalScript: Detects that an external script is about to load.
** BeforeEvent: Can detect that an event is about to be triggered.  
BeforeEvent.load, would for instance detect that a load event is about to  
fire
** BeforeEventListener: Detects that an event listener is about to be  
triggered. Example: BeforeEventListener.mousemove
** AfterEvent: The 'AfterEvent' event allows a User JavaScript to check if  
a script on the page has cancelled an action.
** There is also BeforeJavascriptURL and AfterJavascriptURL

So, before you decide to quote me out of context and deliberately  
misunderstand understand that the two different models of Greasemonkey and  
Opera User Javascript promote two slightly different coding styles, and  
they also promote slightly different applications.

For the record, if scripts on userjs.org are known to be  
Greasemonkey-compatible, they will be marked as such. Interoperability is  
good, and also in our common interest.
-- 
Arve Bersvendsen | http://userjs.org/ | http://virtuelvis.com/


More information about the Greasemonkey mailing list