[Greasemonkey] Trying to change image before browser fetches

Mark Pilgrim pilgrim at gmail.com
Thu Feb 16 09:22:14 EST 2006


On 2/16/06, James Sheridan <stuff at phosphor-ink.com> wrote:
> I'm trying to create a script that looks for a particular string in
> image "src" attributes and changes it, *before* the browser sends out
> for the image.  The code below does indeed change the "src" attr, but it
> seems to do it after the images are already loaded.  That doesn't help me.

Yup, you're screwed.  GM runs too late to stop images from loading. 
You can replace them after the fact, but the original image will still
be loaded before it is replaced.

--
Cheers,
-Mark


More information about the Greasemonkey mailing list