iWiW design fix

By KARASZI István Last update Nov 12, 2007 — Installed 816 times.
// Copyright 2007 Istvan Karaszi <iwiw@spam.raszi.hu>.
// All rights Reserved.

// ==UserScript==
// @name          iWiW design fix
// @namespace     http://persistent.info/greasemonkey
// @description	  Removes the stupid fixed-width design and the more stupid icons
// @include       http://*iwiw.hu/*
// @include       https://*wiw.hu/*
// ==/UserScript==

const CSSRULES = [
	".layouttable, #layout-table { width: 100% !important; }",
	"#center-cell { width: 100% !important; }",
	"#content { width: 100% !important; }",
	"div.cardlist { width: 100% !important; }",
	".datasheet { width: 100% !important; }"
];

_appendCSSRules();

function _appendCSSRules() {
	var styleNode;

	if ((styleNode = document.createElement("style"))) {
		document.body.appendChild(styleNode);

		var styleSheet = document.styleSheets[document.styleSheets.length - 1];
		for (var i = 0; i < CSSRULES.length; i++) {
			styleSheet.insertRule(CSSRULES[i], 0);
		}
	}
}