MultiROM Makes its Way Over to the HTC One (M8)

While browsing our forum, you will undoubtedly find more than a few enticing ROMs available … more

Welcome to the New XDA-Developers Portal!

You may recall that a few weeks ago, we opened up the XDA-2015 forum themesto intrepid users … more

An Android Enthusiast’s Apple iPhone 6 Challenge

The media has gone batty again over Apple “revolutionizing” smartphones. … more

Sony to Extend its AOSP Program to Other Devices

Sony will be offering its users the possibility to use AOSP ROMs as an alternative to the … more
Post Reply

Web Browser Invert Colors Bookmarklet

31st August 2011, 03:43 PM   |  #1  
tmuka's Avatar
OP Senior Member
Flag Grand Rapids, MI
Thanks Meter: 26
 
319 posts
Join Date:Joined: Oct 2008
More
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!
The Following User Says Thank You to tmuka For This Useful Post: [ View ]
6th September 2011, 01:14 PM   |  #2  
Account currently disabled
Thanks Meter: 415
 
4,162 posts
Join Date:Joined: Jul 2011
does this work on wp7??
6th September 2011, 02:02 PM   |  #3  
tmuka's Avatar
OP Senior Member
Flag Grand Rapids, MI
Thanks Meter: 26
 
319 posts
Join Date:Joined: Oct 2008
More
Smile
Quote:
Originally Posted by Magpir

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.
8th September 2011, 05:22 AM   |  #4  
Account currently disabled
Thanks Meter: 415
 
4,162 posts
Join Date:Joined: Jul 2011
Quote:
Originally Posted by tmuka

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?
8th September 2011, 12:51 PM   |  #5  
tmuka's Avatar
OP Senior Member
Flag Grand Rapids, MI
Thanks Meter: 26
 
319 posts
Join Date:Joined: Oct 2008
More
Quote:
Originally Posted by Magpir

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...
8th September 2011, 02:59 PM   |  #6  
Account currently disabled
Thanks Meter: 415
 
4,162 posts
Join Date:Joined: Jul 2011
Quote:
Originally Posted by tmuka

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
Last edited by Magpir; 8th September 2011 at 03:02 PM.
29th September 2011, 05:38 AM   |  #7  
Senior Member
Flag Taipei
Thanks Meter: 97
 
173 posts
Join Date:Joined: Sep 2011
More
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
Last edited by claimui; 3rd October 2011 at 07:03 PM.
29th September 2011, 09:13 AM   |  #8  
yareally's Avatar
Senior Member
Thanks Meter: 220
 
1,422 posts
Join Date:Joined: 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.
29th September 2011, 01:51 PM   |  #9  
tmuka's Avatar
OP Senior Member
Flag Grand Rapids, MI
Thanks Meter: 26
 
319 posts
Join Date:Joined: Oct 2008
More
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!
29th September 2011, 03:25 PM   |  #10  
yareally's Avatar
Senior Member
Thanks Meter: 220
 
1,422 posts
Join Date:Joined: Feb 2011
Donate to Me
Quote:
Originally Posted by tmuka

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

Post Reply Subscribe to Thread

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

Advanced Search
Display Modes


Top Threads in Android Software and Hacking General [Developers Only] by ThreadRank