[Greasemonkey] replacing a script with my own

jjazz jvasile at gmail.com
Wed Sep 13 09:24:15 EDT 2006



esquifit-2 wrote:
> 
> GM can access the DOM (in particular <scripts> tags) only after it has
> been
> completely built, and before it is rendered.  By the time GM runs, the
> code
> contained in <script> tags has already been executed.  This makes sense
> IMHO
> because the code within <script> tags could potentially modify or even
> completelly specify (eg. document.write() ) the DOM that has to be
> rendered.
> 
> Even if one is sure about the script not modifying the document structure,
> I
> do not know of any work-around (that would be fantastic, for instance for
> getting rid of Red Sheriff intrusive scripts).
> 

I was afraid the answer would be something like this.  I was hoping GM could
access the DOM after loading but before rendering.  What would be best is if
GM could jump in at any point.  In any case, thanks for the swift reply.

-- 
View this message in context: http://www.nabble.com/replacing-a-script-with-my-own-tf2264406.html#a6287797
Sent from the MozDev - greasemonkey forum at Nabble.com.



More information about the Greasemonkey mailing list