User:Anudeepsunki/vector.js

// ==UserScript== // @name         Wikipedia (readable, hyphenation) // @namespace    http://userstyles.org // @description	 Improves the readability of the articles. // @author       Lupurus // @homepage     https://userstyles.org/styles/56739 // @run-at       document-start // @version      0.20131018041343 // ==/UserScript== (function {var css = ""; css += [		"/*",		" * Style by Lupurus",		" */",		"",		"@namespace url(http://www.w3.org/1999/xhtml);"	].join("\n"); if (false || (document.domain == "wikipedia.org" || document.domain.substring(document.domain.indexOf(".wikipedia.org") + 1) == "wikipedia.org"))	css += [

].join("\n"); if (false || (new RegExp("^(.*wikipedia.org/wiki/(?!.*:)(?!Main_Page).*)|(.*secure.wikimedia.org/wikipedia/../wiki/(?!.*:)(?!Main_Page).*)$")).test(document.location.href)) css += [ "#firstHeading {", "   width: 800px !important;", "   text-align: center !important;", "   font-size: 4em !important;", "   -moz-hyphens: auto;", "   -webkit-hyphens: auto;", "   hyphens: auto;", "   font-weight: bold !important;", "   text-shadow: 4px 4px 0 #DDD;", "}",		"#firstHeading i:first-child {", "   font-style: normal !important;", "}",		"#firstHeading, h1, h2, h3, h4 {", "   font-family: Palatino !important;", "}",		"",		"#bodyContent {", "   width: 800px !important;", "   text-align: justify;", "   -moz-hyphens: auto;", "   -webkit-hyphens: auto;", "   hyphens: auto;", "   font-family: Palatino !important;", "   font-size: 12pt !important;", "}",		"",		"/*",		" * border around the article", " */",		"#content {", "   -moz-box-shadow: 0px -10px 30px #BBB;", "   -webkit-box-shadow: 0px -10px 30px #BBB;", "   box-shadow: 0px -10px 30px #BBB;", "   margin: auto !important; ", "   width: 800px !important;", "   padding: 80px !important; ", "   padding-top: 20px !important;", "   border: 0 !important;", "}",		"",		"body {", "   background: #FFFFFF !important;", "}",		"",		"#content {", "   background: #FFF !important;    /* removes the border of the menu */", "}",		"",		"/* margins */", ".infobox, .tright, .sidebar {", "   margin: 0 0 0.5em 2em !important;", "}",		".tleft {", "   margin: 0 2em 0.5em 0 !important;", "}",		"",		"/*",		" * hide things", " *",		" */",		"",		"#p-personal, #left-navigation, #mw-head-base, #mw-page-base, #p-views, #footer {", "   display: none !important;", "}",		"",		"/*",		" * searchbar", " */",		"",		"#mw-head {", "   height: 35px;", "   background: -moz-linear-gradient(top, rgba(237,237,237,1) 0%, rgba(219,219,219,1) 100%);", "   background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(237,237,237,1)), color-stop(100%,rgba(219,219,219,1)));    ", "   background: linear-gradient(to bottom,  rgba(237,237,237,1) 0%,rgba(219,219,219,1) 100%);     ", "   border-bottom: 1px solid #AAA;", "",		"}",		"#content {", "   margin-top: 35px !important;", "}",		"#simpleSearch {", "   margin-top: 0 !important;", "}",		".imeselector {", "   display: none !important;", "}",		"",		"#mw-panel {", "   opacity: 0;", "   top: 195px !important;", "}",		"",		"#mw-panel:hover {", "   opacity: 1;", "}",		"",		"#right-navigation {", "   margin: 0 !important;", "}",		"",		"/*",		" * numbering of the headings", " */",		"body {", "   counter-reset: headingOne;", "}",		"#toctitle h2:before {", "   content: \"\" !important;", "   counter-reset: headingOne;", "}",		"#content h2 {", "   counter-reset: headingTwo;", "}",		"#content h2:before {", "   counter-increment: headingOne;", "   content: counter(headingOne) \".\";", "}",		"#content h3 {", "   counter-reset: headingThree;", "}",		"#content h3:before {", "   counter-increment: headingTwo;		", "   content: counter(headingOne) \".\" counter(headingTwo) \".\";", "}",		"#content h4 {", "   counter-reset: headingFour;", "}",		"#content h4:before {", "   counter-increment: headingThree;", "   content: counter(headingOne) \".\" counter(headingTwo) \".\" counter(headingThree) \".\";", "}",		"#content h5:before {", "   counter-increment: headingFour;", "   content: counter(headingOne) \".\" counter(headingTwo) \".\" counter(headingThree) \".\" counter(headingFour) \".\";", "}"	].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); } } });