firefox - How to mobilize all links, in a browsed page, using Google Mobilizer? -


i'm trying make links on of pages "mobilized" great service google mobilizer.

eg: change urls like:

http://imgur.com/  

to:

http://www.google.com/gwt/x?u=imgur.com 

google mobilizer reduces size of whatever url passed greatly. images reduced in size. first frame of animated gifs rendered, , resource heavily reduced in size. decreases download time on low-bandwidth , high latency connections.

could done in firefox add-on or userscript? links on webpage prefixed www.google.com/gwt/x?u=?

there's a chrome extension gives context-menu item it.

yes, firefox add-on can , firefox greasemonkey script should able it.

here's outline of how might done firefox-only greasemonkey script:

  1. set script run @ document-start , use mutationobservers watch creation of new <a>, <img>, , possibly <iframe> elements.

  2. when new <a>, <iframe>, etc. element found, rewrite src or href property use mobilizer service.

  3. when new <img> found things little trickier. i think if delete <img> node, stops load of image (if had started). needs tested, effects on image server.

    if original image still loaded, abandon approach , use add-on. or, use adblock plus block original images.

    anyway, steps in case be:

    1. copy <img> node's outerhtml.
    2. note <img> node's parent , node position in relation sibling nodes.
    3. delete <img> node.
    4. modify src part point mobilizer service.
    5. create new <img> node, old 1 was.

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -