User:कला.घोडा/common.js

Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
// ==UserScript==
// @name          Ported Wikipedia Beautifier
// @namespace     http://userstyles.org
// @description	  I have ported the excellent Beautify Wikipedia chrome extension to Stylish for Firefox.
// @author        strive
// @homepage      https://userstyles.org/styles/64118
// @include       http://wikipedia.org/*
// @include       https://wikipedia.org/*
// @include       http://*.wikipedia.org/*
// @include       https://*.wikipedia.org/*
// @run-at        document-start
// @version       0.20121211041550
// ==/UserScript==
(function() {var css = [
	"#firstHeading {",
	"        font-family: Minion Pro, Palatino, Georgia, \"Times New Roman\", serif !important;",
	"        width: 900px !important;",
	"        margin-left: auto !important;",
	"        margin-right: auto !important;",
	"        padding-top: 0.25em !important;",
	"        padding-bottom:0.25em !important;",
	"        border: none !important;",
	"        font-weight: bold !important;",
	"    }",
	"",
	"    #bodyContent {",
	"        font-family: Minion Pro, Palatino, Georgia, \"Times New Roman\", serif !important;",
	"        font-size: 1.09em !important;",
	"        line-height: 1.55em !important;",
	"        border: 1px solid #ccc !important;",
	"        width: 900px !important;",
	"        padding: 50px !important;",
	"        margin-left: auto !important;",
	"        margin-right: auto !important;",
	"        margin-top: 1em !important;",
	"        background: #fbfbfb !important;",
	"    }",
	"    ",
	"    #mw-articlefeedback {",
	"        font-family: sans-serif !important;",
	"        font-size: 0.994em !important;",
	"    }",
	"",
	"    /* Hover to reveal */",
	"    #mw-head, #mw-panel {",
	"        opacity: 0;",
	"        -moz-transition: all 400ms ease-in-out !important;",
	"        -webkit-transition: all 400ms ease-in-out !important;",
	"    }",
	"",
	"    #mw-head:hover, #mw-panel:hover {",
	"        opacity: 1;",
	"    }",
	"",
	"    .infobox,",
	"    .tright, .tleft, div.tright, div.tleft,",
	"    .taxobox, table.taxobox,",
	"    .wikitable {",
	"        margin-top: 0;",
	"        margin-bottom: 0.5em;",
	"    }",
	"",
	"    .ambox, table.ambox {",
	"        margin: 1.5em 10%;",
	"    }",
	"",
	"    pre {",
	"        overflow: auto;",
	"    }"
].join("\n");
if (typeof GM_addStyle != "undefined") {
	GM_addStyle(css);
} else if (typeof PRO_addStyle != "undefined") {
	PRO_addStyle(css);
} else if (typeof addStyle != "undefined") {
	addStyle(css);
} else {
	var node = document.createElement("style");
	node.type = "text/css";
	node.appendChild(document.createTextNode(css));
	var heads = document.getElementsByTagName("head");
	if (heads.length > 0) {
		heads[0].appendChild(node); 
	} else {
		// no head yet, stick it whereever
		document.documentElement.appendChild(node);
	}
}
})();