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:
set script run @
document-start
, usemutationobserver
s watch creation of new<a>
,<img>
, , possibly<iframe>
elements.when new
<a>
,<iframe>
, etc. element found, rewritesrc
orhref
property use mobilizer service.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:
- copy
<img>
node'souterhtml
. - note
<img>
node's parent , node position in relation sibling nodes. - delete
<img>
node. - modify
src
part point mobilizer service. - create new
<img>
node, old 1 was.
- copy
Comments
Post a Comment