All pastes #539367 Raw Edit

fix font

public javascript v1 · immutable
·published 2007-06-05 07:35 UTC
rendered paste body
(function () {    for(stylesheets in document.styleSheets) {        for(cssrules in stylesheets.cssRules) {            if ("styleSheet" in cssrules) {                cssrules = cssrules.styleSheet.cssRules;            }            for(rule in cssrules) {                if(rule.style.fontFamily.length > 0 ) {                    var iOf = rule.style.fontFamily.indexOf;                    if(iOf('arial') != -1 && iOf('arial') > iOf('verdana')) {                        rule.style.fontFamily = 'corbel';                        rule.style.fontSizeAdjust = .519;                     } else if(iOf('verdana') != -1) {                        rule.style.fontFamily = 'corbel';                        rule.style.fontSizeAdjust = .58;                     } else if(iOf('courier new') != -1) {                        rule.style.fontFamily = 'consolas';                    }                }            }        }    }})();