schuelerVZ und studiVZ in coolem Dunkelblau

By gotnoname Last update Mar 30, 2008 — Installed 16,664 times. Daily Installs: 18, 6, 9, 15, 9, 6, 11, 16, 17, 16, 10, 15, 18, 16, 13, 24, 6, 12, 12, 8, 27, 11, 16, 19, 9, 9, 4, 13, 10, 14, 19, 19
// ==UserScript==
// @name           schuelerVZ und studiVZ in coolem Dunkelblau
// @namespace      http://suwandhi.de/svz
// @description    Das SchuelerVZ in coolem Blau statt Rosa oder Hellblau
// @include        http://*schuelervz.net/*
// @include        http://*studivz.net/*
// @version        1.2
// ==/UserScript==
function addGlobalStyle(css) {
     var head, style;
     head = document.getElementsByTagName('head')[0];
     if (!head) { return; }
     style = document.createElement('style');
     style.type = 'text/css';
     style.innerHTML = css;
     head.appendChild(style);
}
function getNodeByXPath(path) {
    return document.evaluate(path,document,null,
			     XPathResult.FIRST_ORDERED_NODE_TYPE,null)
	.singleNodeValue;
}
addGlobalStyle('@import url(http://suwandhi.de/svz/svz_darkblue.css);');
var logoImg = getNodeByXPath("id('logo')//img");
if (window.location.host == "www.schuelervz.net"){
    addGlobalStyle('#topHeader {background-image:url("http://suwandhi.de/svz/Img/svz_header.jpg")};');
    logoImg.src="http://suwandhi.de/svz/Img/logo.png";}
else{
    addGlobalStyle('#topHeader {background-image:url("http://suwandhi.de/svz/Img/svz_header2.jpg")};');
    logoImg.src="http://suwandhi.de/svz/Img/logo2.png";}