Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,731,116 Members 48,258 Now Online
XDA Developers Android and Mobile Development Forum

Web Browser Invert Colors Bookmarklet

Tip us?
 
tmuka
Old
#1  
tmuka's Avatar
Senior Member - OP
Thanks Meter 26
Posts: 315
Join Date: Oct 2008
Location: Grand Rapids, MI
Lightbulb Web Browser Invert Colors Bookmarklet

I was looking for a solution to invert browser colors on my Epic4G. I look forward to a day when Cyanogenmod runs on the epic so I can use the modded browser with "invert colors". Dolphin HD's "Reader" addon was close, but it added padding to the browser on my Epic.

So... i decided maybe a javascript bookmarklet could do what i wanted. turns out, it did.

This has only been tested in the Android 2.3.4 stock browser. To use it, copy the code from the page linked to below into the clipboard and add a new bookmark, pasting the code into the URL box. Give it a name like "Invert Color". Then when you're viewing a page you want to invert, open the bookmarks menu, and click the bookmark.

http://tonymuka.com/js/

You still have to click the link for every page you browse to for now, but perhaps somebody knows a better way. I did try to contact Dolphin for info on writing Addons, but it doesn't seem very open. I haven't used firefox mobile too much yet, but maybe there is potential there...

I wasn't sure exactly where to post this, and since it might work on any device with a browser that supports bookmarklets, i put it in general. mods should feel free to move it with my thanks!

Enjoy!
Sprint EVO 4G LTE, formerly Sprint Nexus S 4G, Sprint Epic 4G, Sprint HTC Hero.
The Following User Says Thank You to tmuka For This Useful Post: [ Click to Expand ]
 
Magpir
Old
#2  
Account currently disabled
Thanks Meter 415
Posts: 4,162
Join Date: Jul 2011
does this work on wp7??
 
tmuka
Old
#3  
tmuka's Avatar
Senior Member - OP
Thanks Meter 26
Posts: 315
Join Date: Oct 2008
Location: Grand Rapids, MI
Quote:
Originally Posted by Magpir View Post
does this work on wp7??
It should work in any modern HTML compliant browser that supports javascript in bookmarks. You'll probably have to copy and paste the javascript into the bookmark and give it a try. Please let us know if it does I tried this weekend in Dolphin HD on Android, and in Mobile Safari on Apple's iPad2 and it works there too.
Sprint EVO 4G LTE, formerly Sprint Nexus S 4G, Sprint Epic 4G, Sprint HTC Hero.
 
Magpir
Old
#4  
Account currently disabled
Thanks Meter 415
Posts: 4,162
Join Date: Jul 2011
Quote:
Originally Posted by tmuka View Post
It should work in any modern HTML compliant browser that supports javascript in bookmarks. You'll probably have to copy and paste the javascript into the bookmark and give it a try. Please let us know if it does I tried this weekend in Dolphin HD on Android, and in Mobile Safari on Apple's iPad2 and it works there too.
i tried it works on windowsphone IE 9 in mango

But not all webpages invert colour

and also each time u need to press the bookmarklet

is there a permanent solution?
 
tmuka
Old
#5  
tmuka's Avatar
Senior Member - OP
Thanks Meter 26
Posts: 315
Join Date: Oct 2008
Location: Grand Rapids, MI
Quote:
Originally Posted by Magpir View Post
i tried it works on windowsphone IE 9 in mango
But not all webpages invert colour
and also each time u need to press the bookmarklet
is there a permanent solution?
Glad to hear it works in mango!

Unfortunately i don't know a way to make it permanent, i think the browser would have to allow such plugins to run automatically every time a page loads. (like a greasemonkey script, etc)

If you send a link to a page that wont invert I'll check it out and see if i can fix it. If it has a background image or flash there's not much i can do without removing background images altogether...
Sprint EVO 4G LTE, formerly Sprint Nexus S 4G, Sprint Epic 4G, Sprint HTC Hero.
 
Magpir
Old
(Last edited by Magpir; 8th September 2011 at 03:02 PM.)
#6  
Account currently disabled
Thanks Meter 415
Posts: 4,162
Join Date: Jul 2011
Quote:
Originally Posted by tmuka View Post
Glad to hear it works in mango!

Unfortunately i don't know a way to make it permanent, i think the browser would have to allow such plugins to run automatically every time a page loads. (like a greasemonkey script, etc)

If you send a link to a page that wont invert I'll check it out and see if i can fix it. If it has a background image or flash there's not much i can do without removing background images altogether...
just try to make it permanent...like a cookie ect,,

or make an entire new browser and upload to marketplace for free
 
claimui
Old
(Last edited by claimui; 3rd October 2011 at 07:03 PM.)
#7  
Senior Member
Thanks Meter 96
Posts: 173
Join Date: Sep 2011
Location: Taipei
Tony, thanks for this. It inspired me to think about a more permanent solution using a web filtering proxy. I have proof that it would work, but I don't have the skills to develop this further. Would be great if you could take a look at this and see if you have any thoughts: http://forum.xda-developers.com/show...php?p=17960461
 
yareally
Old
#8  
yareally's Avatar
Senior Member
Thanks Meter 220
Posts: 1,422
Join Date: Feb 2011

 
DONATE TO ME
Browsers that support web storage could probably do it.

Also the one browser I know wont have a problem making it permanent would be Opera Mobile, because it supports user javascript and css like the desktop browser does.
 
tmuka
Old
#9  
tmuka's Avatar
Senior Member - OP
Thanks Meter 26
Posts: 315
Join Date: Oct 2008
Location: Grand Rapids, MI
claimui, great idea, i'll check it out!

yareally, i'm an old opera fan, but haven't fallen in love with the mobile version despite several attempts... gotta love the user js and css though- didn't know you could use them on mobile too!
Sprint EVO 4G LTE, formerly Sprint Nexus S 4G, Sprint Epic 4G, Sprint HTC Hero.
 
yareally
Old
#10  
yareally's Avatar
Senior Member
Thanks Meter 220
Posts: 1,422
Join Date: Feb 2011

 
DONATE TO ME
Quote:
Originally Posted by tmuka View Post
claimui, great idea, i'll check it out!

yareally, i'm an old opera fan, but haven't fallen in love with the mobile version despite several attempts... gotta love the user js and css though- didn't know you could use them on mobile too!
Yeah, it's not quite as friendly to do as the desktop browser, but you can set the userjs/usercss locations and such in opera.ini and mod whatever you like.

I semi wrote an informal tutorial on it in a thread for opera mobile in the forum area http://my.opera.com/community/forums....pl?id=9373312

Tags
bookmarklet, browser, colors, invert
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


TRENDING IN THEMER...