[Greasemonkey] Installing a user script via a data: url

Michael Bierman greasemonkey at thebiermans.net
Fri Apr 8 18:21:14 EDT 2005


Interesting idea--is there a default if these values aren't found?  Perhaps
location Before </Body>?

Michael

-----Original Message-----
From: greasemonkey-bounces at mozdev.org
[mailto:greasemonkey-bounces at mozdev.org] On Behalf Of Aaron Boodman
Sent: Friday, April 08, 2005 5:06 PM
To: greasemonkey at mozdev.org
Subject: Re: [Greasemonkey] Installing a user script via a data: url

Ok.

One thing you may want to think about. When I get to injecting scripts
earlier into moz, I was thinking of adopting a syntax like this: (I think it
was Bill Donnelly who first suggested it).

//=== @locationAfter <head> ===

script to be injected after the opening head tag goes here  ....

//=== @locationBefore </body> ===

script to be injected before the closing body tag goes here ...

//=== @locationReplace /<body>.*?</body>/n ===

script to replace the entire body goes here ...

This will allow authors to be able to do things they cannot do today becaise
they don't get injected early enough, or at the specific time they need to.
Sorta like a poorman's HTML overlays. (can't do real overlays because we
have no DOM at this early stage).

It seems closely related to what you are working on, right?




More information about the Greasemonkey mailing list