05 December 2007

Java magic (kinda long)

I prefer the Internet to look like a newspaper - dark text on a light background. I find it difficult to read pages with light text on a dark background. I'm not alone. The Feds even wrote a book about it, plus it's taught in college.

I thought there wasn't much I could do about it until I ran into this fix:

javascript:(function(){var newSS, styles='* { background: white ! important; color: black !important } :link, :link * { color: #0000EE !important } :visited, :visited * { color: #551A8B !important }'; if(document.createStyleSheet) { document.createStyleSheet(%22javascript:'%22+styles+%22'%22); } else { newSS=document.createElement('link'); newSS.rel='stylesheet'; newSS.href='data:text/css,'+escape(styles); document.getElementsByTagName(%22head%22)[0].appendChild(newSS); } })();

What is it? It's javascript that will change those pesky dark background websites, but it only works if you use Firefox as your browser.

To use it:
  1. Copy all of the italicized text
  2. Click on Bookmarks
  3. Click "Bookmark This Page"
  4. Paste the text in the "Name" block, click OK (the bookmarks will close after this)
  5. Click on bookmarks again and find the text you just pasted in the list
  6. Right click it and name it - I named it "B2W"
(* If that doesn't work for you try joated's solution in the comments)

The next time you find yourself on a white print / dark background webpage, just open your bookmarks, click on the name "B2W" or whatever name you used and and voila! the webpage is now dark print on a white backround. Amazing.

Of course, there are no absolutes in life. There's many opinions out there and that holds true for this subject .

Incidentally, I'd like to say I sat down one afternoon and wrote the script while cleaning my toes or something like that. Alas, I'm not that smart or dexterious. I found it on
some geek page that I forgot to bookmark. So whoever wrote it, sorry for not linking you, but I do thank you very much.


joated said...

Your solution works but not your directions. The javascript text has got to go in the location box and the B2w in the name box of your bookmark.

I suggest the following corrections:

4. Name the bookmark "B2W" (click OK and the window will disappear)
5. Click on the Bookmarks mwnu and select Organize Bookmarks. Find "B2W" and click it once to select.
6. With "B2W" selected click on Rename on the toolbar.
7. Paste the italicized text into the Location portion of the window.
8. Click OK.

Now when you click on the bookmark while at one of those hard to read sights it really does turn into black-on-white.

Appalachian Gun Trash said...

Well, now, joated, I tried it again and other than I left out the "click OK" instruction in 4. it worked for me as advertised. Maybe there's more than one way to get it done. :-)