Running is therapy

a blog about running, cats, Linux and programming.
  • Home
  • Current Schedule
  • Personal Records
  • Upcoming Races

Fixing the web…again

Published by Nathan Powell on April 16, 2006 01:13 pm under computers

Love it or hate it, Web2.0 has some things to offer us. The most significant one being: People with some sense of style are getting in on the game. I like the looks of a lot more sites now than I did a few years ago. People that know what looks good are hacking away at css.

This is cool, becuase those of us who are not good at these things can steal their ideas!

I have been using Ruby On Rails (though most of that is for another post), and one of the first things I noticed is that the fonts in a rails app are the typical Web2.0 looking things. Crisp clear, sweet! It’s just CSS, ripp it out of there and put it in a greasemonkey script and viola! The whole web gets a face lift!

// ==UserScript==
// @namespace http://nathanpowell.org
// @name I hate everyones fonts!
// @description use my fonts!
// @include *
// ==/UserScript==
var newCss = 'body {' +
                           'font-family: verdana, arial, helvetica, sans-serif;' +
                           '}';
 
function overRideCSS( newCss ) {
    var head = document.getElementsByTagName("head")[0];
    var styleTag = document.createElement("style");
    styleTag.setAttribute("type", 'text/css');
    styleTag.innerHTML = newCss;
    head.appendChild(styleTag);
}
 
overRideCSS( newCss );

I have used this script before to fix other sites CSS, but this one I let execute on every site I visit. Try it, it's sweet!

No Comment

Comments are closed.

Posting your comment.

  • Search

  • Archives

    • October 2008 (5)
    • September 2008 (4)
    • August 2008 (10)
    • July 2008 (11)
    • June 2008 (14)
    • May 2008 (15)
    • April 2008 (10)
    • March 2008 (16)
    • February 2008 (17)
    • January 2008 (37)
    • December 2007 (21)
    • November 2007 (30)
    • October 2007 (29)
    • September 2007 (22)
    • August 2007 (30)
    • July 2007 (49)
    • June 2007 (32)
    • May 2007 (29)
    • April 2007 (38)
    • March 2007 (26)
    • February 2007 (25)
    • January 2007 (23)
    • December 2006 (10)
    • November 2006 (12)
    • October 2006 (9)
    • September 2006 (9)
    • August 2006 (5)
    • July 2006 (13)
    • June 2006 (9)
    • May 2006 (8)
    • April 2006 (11)
    • March 2006 (12)
    • February 2006 (12)
    • January 2006 (13)
    • December 2005 (15)
    • November 2005 (19)
    • October 2005 (8)
  • Categories

    • blather (63)
    • books (10)
    • computers (177)
    • cooking (1)
    • economics (3)
    • emacs (3)
    • football (1)
    • gaming (1)
    • hiking (5)
    • housekeeping (5)
    • lifehacking (7)
    • music (3)
    • paddling (2)
    • personal (1)
    • politics (21)
    • programming (70)
    • running (233)
    • smoking (40)
    • sysadmin (10)
    • tlc (10)
    • Uncategorized (1)
  • Pages

    • Current Schedule
    • Personal Records
    • Upcoming Races

Copyright © 2008 Running is therapy
WordPress Theme based on Light Theme