User:Giuseppe Mastrodomenico/common.js

// ==UserScript== // @name         Wikipedia: WiTeX // @namespace    http://userstyles.org // @description	 If Donald Knuth had designed Wikipedia // @author       Vortico // @homepage     https://userstyles.org/styles/117853 // @include      http://wikipedia.org/* // @include      https://wikipedia.org/* // @include      http://*.wikipedia.org/* // @include      https://*.wikipedia.org/* // @run-at       document-start // @version      0.20150820004115 // ==/UserScript== (function {var css = [	"/*********************************************************************",	"This is free and unencumbered software released into the public domain.",	"",	"Anyone is free to copy, modify, publish, use, compile, sell, or",	"distribute this software, either in source code form or as a compiled",	"binary, for any purpose, commercial or non-commercial, and by any",	"means.",	"",	"For more information, please refer to ",	"*********************************************************************/",	"",	"/*",	"WiTeX",	"https://github.com/AndrewBelt/WiTeX",	"*/",	"",	"",	"/* Latin Modern (LaTeX default) font */",	"",	"@font-face {",	"	font-family: \'Latin Modern Roman\';",	"	font-weight: normal;",	"	font-style: normal;",	"	src: url(\'https://cdn.rawgit.com/AndrewBelt/WiTeX/master/fonts/lmroman10-regular.woff\') format(\'woff\');",	"}",	"",	"@font-face {", "	font-family: \'Latin Modern Roman\';", "	font-weight: bold;", "	font-style: normal;", "	src: url(\'https://cdn.rawgit.com/AndrewBelt/WiTeX/master/fonts/lmroman10-bold.woff\') format(\'woff\');", "}",	"",	"@font-face {", "	font-family: \'Latin Modern Roman\';", "	font-weight: normal;", "	font-style: italic;", "	src: url(\'https://cdn.rawgit.com/AndrewBelt/WiTeX/master/fonts/lmroman10-italic.woff\') format(\'woff\');", "}",	"",	"@font-face {", "	font-family: \'Latin Modern Roman\';", "	font-weight: bold;", "	font-style: italic;", "	src: url(\'https://cdn.rawgit.com/AndrewBelt/WiTeX/master/fonts/lmroman10-bolditalic.woff\') format(\'woff\');", "}",	"",	"@font-face {", "	font-family: \'Latin Modern Mono\';", "	font-weight: normal;", "	font-style: normal;", "	src: url(\'https://cdn.rawgit.com/AndrewBelt/WiTeX/master/fonts/lmmono10-regular.woff\') format(\'woff\');", "}",	"",	"@font-face {", "	font-family: \'Latin Modern Mono\';", "	font-weight: normal;", "	font-style: italic;", "	src: url(\'https://cdn.rawgit.com/AndrewBelt/WiTeX/master/fonts/lmmono10-italic.woff\') format(\'woff\');", "}",	"",	"/* Page Layout */", "",	"body {", "	background: none;", "	font-size: 14pt;", "	font-family: \'Latin Modern Roman\', serif;", "	color: black;", "}",	"",	"h1, h2, h3, h4, h5, h6 {", "	border: none;", "	font-weight: bold;", "}",	"",	"a, a:visited {", "	color: #0073e6;", "}",	"",	"a.new, a.new:visited {", "	color: black;", "}",	"",	"ul {", "	list-style: disc;", "}",	"",	"#mw-navigation, #mw-page-base, #mw-head-base, #footer {", "	/* nuke everything but the content */", "	display: none;", "}",	"",	"/* Content Box */", "",	".mw-body {", "	max-width: 720px;", "	margin: 1em auto;", "}",	"",	"#content, div#content {", "	border: none;", "	color: black;", "}",	"",	"#firstHeading, #siteSub {", "	text-align: center;", "	display: block;", "}",	"",	"#siteSub {", "	margin-top: -0.5em;", "	margin-bottom: 4em;", "}",	"",	"/* Article Body */", "",	".mw-body-content {", "	font-size: inherit;", "	text-align: justify;", "	-moz-hyphens: auto;", "	-webkit-hyphens: auto;", "	hyphens: auto;", "	line-height: 1.5em;", "}",	"",	".mw-body {", "	padding: 2em 0;", "}",	"",	".mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6, div#content h1, div#content h2, div#content #firstHeading {", "	font-family: inherit;", "	line-height: 1.5em;", "	margin-bottom: 0.5em;", "}",	"",	".mw-body h1, div#content h1 {", "	font-size: 2em;", "}",	"",	".mw-body h2, div#content h2 {", "	font-size: 1.5em;", "}",	"",	".mw-body h3 {", "	font-size: 1.2em;", "}",	"",	".mw-body h4 {", "	font-size: 1.1em;", "}",	"",	".mw-body h5, .mw-body h6 {", "	font-size: 1.0em;", "}",	"",	".mw-body p {", "	margin: 0;", "}",	"",	".mw-body p + p {", "	text-indent: 2em;", "}",	"",	".mw-editsection {", "	/* hide more non-content */", "	display: none;", "}",	"",	"table.ambox {", "	margin-bottom: 1em;", "}",	"",	"dl dd {", "	/* center definitions (most useful for display equations) */", "	text-align: center;", "}",	"",	"span.texhtml {", "	/* revert inline math to default font */", "	font-family: inherit;", "	font-size: inherit;", "	line-height: inherit;", "}",	"",	"/* Table of Contents */", "",	"#toc, .toc {", "	border: none;", "	padding: 0;", "	background: none;", "	font-size: inherit;", "	/* span 100% of the width */", "	display: block;", "}",	"",	".mw-body #toc h2, .mw-body .toc h2 {", "	font-family: inherit;", "	font-size: 1.5em;", "}",	"",	"#toc h2, .toc h2 {", "	display: block;", "}",	"",	"#toc #toctitle, .toc #toctitle, #toc .toctitle, .toc .toctitle {", "	text-align: left;", "}",	"",	".toctoggle {", "	display: none;", "}",	"",	"/* Figures */", "",	"div.tright {", "	margin: 0.5em 0 0.5em 1.5em;", "}",	"",	"div.tleft {", "	margin: 0.5em 1.5em 0.5em 0;", "}",	"",	"/* Code */", "",	".mw-code {", "	margin: 1em 0;", "}",	"",	"pre, code {", "	font-family: \"Latin Modern Mono\", monospace !important;", "}" ].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); } } });