All pastes #2055609 Raw Edit

Anonymous

public text v1 · immutable
#2055609 ·published 2011-05-09 07:11 UTC
rendered paste body
// ==UserScript==
// @name           All
// @description    All
// @include        http://*
// @include        https://*
// ==/UserScript==
var css = new Array();

function writeStyle(css) {
    var style = document.createElement('style');
    style.type = 'text/css';
    if (document.getElementsByTagName) {
        //document.getElementsByTagName('head')[0].appendChild(style);
	document.getElementsByTagName('head')[0].insertBefore(style, document.getElementsByTagName('head')[0].childNodes[0]);
        if (style.sheet && style.sheet.insertRule) { for (var i = 0; i < css.length; i++) { style.sheet.insertRule(css[i], 0); } }
    }
}

function addStyle(style) {
    css[css.length] = style;
}

// Define your CSS here
addStyle("body { background-color: #FFFFFF; color: #000000; }");
addStyle("input,select,textarea { background-color: #FFFFFF; border: 1px solid black; color: #000000; }");

// Writes CSS to the document
writeStyle(css);