Skip to content

Instantly share code, notes, and snippets.

@gonter
Created December 10, 2014 18:16
Show Gist options
  • Save gonter/5d1986d2e7dc58274629 to your computer and use it in GitHub Desktop.
Save gonter/5d1986d2e7dc58274629 to your computer and use it in GitHub Desktop.
greasemonkey script to replace bad css
// ==UserScript==
// @name p-m-a
// @namespace urxn.at
// @description Verunstaltungen auf p-m-a.at
// @include http://www.p-m-a.at/*
// @include http://imkontext.net/*
// @version 1
// ==/UserScript==
// <link rel="stylesheet" href="/templates/pma-template/css/template.css" type="text/css" />
var node_list = document.getElementsByTagName('link');
for (var i = 0, j = node_list.length; i < j; i++)
{
var node = node_list[i];
// node.setAttribute('style', 'color:#000000;font-size:110%');
if (node.getAttribute('href') == '/templates/pma-template/css/template.css')
{
node.setAttribute('href', 'http://nx01.urxn.at/junk/p-m-a.at/template.css');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment