// ==UserScript==
// @name Readable Wikipedia + minor improvements
// @namespace http://userstyles.org
// @description Larger text and narrower text area to improve readability, Google fonts Roboto and Roboto Slab, Table of Content moved from inline to a sticky position outside text area (only if the screen is wide enough). Other minor improvements.
// @author 72dpi
// @homepage https://userstyles.org/styles/123466
// @include http://en.wikipedia.org/*
// @include https://en.wikipedia.org/*
// @include http://*.en.wikipedia.org/*
// @include https://*.en.wikipedia.org/*
// @run-at document-start
// @version 0.20160124005458
// ==/UserScript==
(function() {var css = [
"/* latin-ext */",
"@font-face {",
" font-family: \'Roboto\';",
" font-style: normal;",
" font-weight: 300;",
" src: local(\'Roboto Light\'), local(\'Roboto-Light\'), url(https://fonts.gstatic.com/s/roboto/v15/Pru33qjShpZSmG3z6VYwnYX0hVgzZQUfRDuZrPvH3D8.woff2) format(\'woff2\');",
" unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;",
"}",
"/* latin */",
"@font-face {",
" font-family: \'Roboto\';",
" font-style: normal;",
" font-weight: 300;",
" src: local(\'Roboto Light\'), local(\'Roboto-Light\'), url(https://fonts.gstatic.com/s/roboto/v15/Hgo13k-tfSpn0qi1SFdUfZBw1xU1rKptJj_0jans920.woff2) format(\'woff2\');",
" unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;",
"}",
"/* latin-ext */",
"@font-face {",
" font-family: \'Roboto\';",
" font-style: normal;",
" font-weight: 400;",
" src: local(\'Roboto\'), local(\'Roboto-Regular\'), url(https://fonts.gstatic.com/s/roboto/v15/Ks_cVxiCiwUWVsFWFA3Bjn-_kf6ByYO6CLYdB4HQE-Y.woff2) format(\'woff2\');",
" unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;",
"}",
"/* latin */",
"@font-face {",
" font-family: \'Roboto\';",
" font-style: normal;",
" font-weight: 400;",
" src: local(\'Roboto\'), local(\'Roboto-Regular\'), url(https://fonts.gstatic.com/s/roboto/v15/oMMgfZMQthOryQo9n22dcuvvDin1pK8aKteLpeZ5c0A.woff2) format(\'woff2\');",
" unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;",
"}",
"/* latin-ext */",
"@font-face {",
" font-family: \'Roboto\';",
" font-style: normal;",
" font-weight: 500;",
" src: local(\'Roboto Medium\'), local(\'Roboto-Medium\'), url(https://fonts.gstatic.com/s/roboto/v15/oOeFwZNlrTefzLYmlVV1UIX0hVgzZQUfRDuZrPvH3D8.woff2) format(\'woff2\');",
" unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;",
"}",
"/* latin */",
"@font-face {",
" font-family: \'Roboto\';",
" font-style: normal;",
" font-weight: 500;",
" src: local(\'Roboto Medium\'), local(\'Roboto-Medium\'), url(https://fonts.gstatic.com/s/roboto/v15/RxZJdnzeo3R5zSexge8UUZBw1xU1rKptJj_0jans920.woff2) format(\'woff2\');",
" unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;",
"}",
"/* latin-ext */",
"@font-face {",
" font-family: \'Roboto\';",
" font-style: italic;",
" font-weight: 300;",
" src: local(\'Roboto Light Italic\'), local(\'Roboto-LightItalic\'), url(https://fonts.gstatic.com/s/roboto/v15/7m8l7TlFO-S3VkhHuR0at6E8kM4xWR1_1bYURRojRGc.woff2) format(\'woff2\');",
" unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;",
"}",
"/* latin */",
"@font-face {",
" font-family: \'Roboto\';",
" font-style: italic;",
" font-weight: 300;",
" src: local(\'Roboto Light Italic\'), local(\'Roboto-LightItalic\'), url(https://fonts.gstatic.com/s/roboto/v15/7m8l7TlFO-S3VkhHuR0at4gp9Q8gbYrhqGlRav_IXfk.woff2) format(\'woff2\');",
" unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;",
"}",
"/* latin-ext */",
"@font-face {",
" font-family: \'Roboto\';",
" font-style: italic;",
" font-weight: 400;",
" src: local(\'Roboto Italic\'), local(\'Roboto-Italic\'), url(https://fonts.gstatic.com/s/roboto/v15/vSzulfKSK0LLjjfeaxcREhkAz4rYn47Zy2rvigWQf6w.woff2) format(\'woff2\');",
" unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;",
"}",
"/* latin */",
"@font-face {",
" font-family: \'Roboto\';",
" font-style: italic;",
" font-weight: 400;",
" src: local(\'Roboto Italic\'), local(\'Roboto-Italic\'), url(https://fonts.gstatic.com/s/roboto/v15/vPcynSL0qHq_6dX7lKVByXYhjbSpvc47ee6xR_80Hnw.woff2) format(\'woff2\');",
" unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;",
"}",
"/* latin-ext */",
"@font-face {",
" font-family: \'Roboto\';",
" font-style: italic;",
" font-weight: 500;",
" src: local(\'Roboto Medium Italic\'), local(\'Roboto-MediumItalic\'), url(https://fonts.gstatic.com/s/roboto/v15/OLffGBTaF0XFOW1gnuHF0aE8kM4xWR1_1bYURRojRGc.woff2) format(\'woff2\');",
" unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;",
"}",
"/* latin */",
"@font-face {",
" font-family: \'Roboto\';",
" font-style: italic;",
" font-weight: 500;",
" src: local(\'Roboto Medium Italic\'), local(\'Roboto-MediumItalic\'), url(https://fonts.gstatic.com/s/roboto/v15/OLffGBTaF0XFOW1gnuHF0Ygp9Q8gbYrhqGlRav_IXfk.woff2) format(\'woff2\');",
" unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;",
"}",
"",
"",
"/* latin-ext */",
"@font-face {",
" font-family: \'Roboto Slab\';",
" font-style: normal;",
" font-weight: 400;",
" src: local(\'Roboto Slab Regular\'), local(\'RobotoSlab-Regular\'), url(https://fonts.gstatic.com/s/robotoslab/v6/y7lebkjgREBJK96VQi37ZqE8kM4xWR1_1bYURRojRGc.woff2) format(\'woff2\');",
" unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;",
"}",
"/* latin */",
"@font-face {",
" font-family: \'Roboto Slab\';",
" font-style: normal;",
" font-weight: 400;",
" src: local(\'Roboto Slab Regular\'), local(\'RobotoSlab-Regular\'), url(https://fonts.gstatic.com/s/robotoslab/v6/y7lebkjgREBJK96VQi37Zogp9Q8gbYrhqGlRav_IXfk.woff2) format(\'woff2\');",
" unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;",
"}",
"/* latin-ext */",
"@font-face {",
" font-family: \'Roboto Slab\';",
" font-style: normal;",
" font-weight: 700;",
" src: local(\'Roboto Slab Bold\'), local(\'RobotoSlab-Bold\'), url(https://fonts.gstatic.com/s/robotoslab/v6/dazS1PrQQuCxC3iOAJFEJYgd9OEPUCN3AdYW0e8tat4.woff2) format(\'woff2\');",
" unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;",
"}",
"/* latin */",
"@font-face {",
" font-family: \'Roboto Slab\';",
" font-style: normal;",
" font-weight: 700;",
" src: local(\'Roboto Slab Bold\'), local(\'RobotoSlab-Bold\'), url(https://fonts.gstatic.com/s/robotoslab/v6/dazS1PrQQuCxC3iOAJFEJf79_ZuUxCigM2DespTnFaw.woff2) format(\'woff2\');",
" unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;",
"}",
"",
"@font-face {",
" font-family: \'FontAwesome\';",
" font-style: normal;",
" font-weight: 400;",
" src: local(\'FontAwesome\'), url(//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/fonts/fontawesome-webfont.woff) format(\'woff\');",
"}",
"",
"#ca-edit span a {",
" border-bottom-width: 0;",
" border-color: #bbb;",
" border-left-width: 0;",
" border-right-width: 1px;",
" border-style: solid;",
" border-top-width: 0;",
"}",
"",
"#ca-talk span a {",
" border-bottom-width: 0;",
" border-color: #bbb;",
" border-left-width: 0;",
" border-right-width: 1px;",
" border-style: solid;",
" border-top-width: 0;",
"}",
"",
"#mw-content-text h2 {",
" border: none;",
" font-size: 32px;",
" font-weight: 300;",
"}",
"",
"#mw-content-text h3 {",
" font-size: 24px;",
" font-weight: 300;",
"}",
"",
"* {",
" font-family: \'Roboto\', sans-serif;",
"}",
"",
".mw-body p {",
" line-height: 1.8em;",
" margin: 1em 0;",
"}",
"",
".mw-body-content {",
" font-size: 18px;",
" font-weight: 300;",
"}",
"",
".thumbcaption {",
" margin-top: 10px;",
"}",
"",
"@media (min-width: 1330px) {",
" div#toc {",
" position: fixed;",
" color: #000;",
" top: 79px;",
" left: 1030px;",
" border: none;",
" background-color: #fff;",
" width: 250px;",
" font-size: 14px;",
" font-weight: 100;",
" padding: 10px;",
" display: block;",
" max-height: calc(100% - 170px);",
" -ms-overflow-y: auto;",
" overflow-y: auto;",
" -ms-overflow-x: hidden;",
" overflow-x: hidden;",
" box-shadow: 0 0 4px rgba(0, 0, 0, 0.11);",
" }",
" .mw-body #toc h2, .mw-body .toc h2 {",
" font-family: \'Roboto Slab\';",
" color: inherit;",
" font-size: 16px;",
" font-weight: 500;",
" letter-spacing: 2px;",
" }",
" div#toc a {",
" color: inherit;",
" }",
" #toc #toctitle, .toc #toctitle, #toc .toctitle, .toc .toctitle { ",
" margin: 10px auto;",
" }",
"}",
"",
"/* MAIN ELEMENTS */",
"",
"/* HEADINGS */",
"",
"div#content {",
" border-left-color: #bbb;",
" border-right-color: #bbb;",
" border-right-width: 1px;",
" border-top-color: #bbb;",
" max-width: 780px;",
"}",
"",
"div#mw-head {",
" left: 0;",
" max-width: 1005px;",
"}",
"",
"div#mw-head-base {",
" width: 829px;",
"}",
"",
"div#mw-page-base {",
" background-color: transparent;",
" background-image: none;",
" width: 1005px;",
"}",
"",
"div#p-search {",
" height: 25px;",
"}",
"",
"div.thumbinner {",
" background-color: transparent;",
" border: none;",
"}",
"",
"h1.firstHeading {",
" font-family: \'Roboto Slab\';",
" font-size: 2.4em;",
" color: #586979;",
" font-weight: 700;",
" border: none;",
"}",
"",
"",
"div.vectorTabs span a {",
" padding-top: 0.3em;",
"}",
"",
"div.vectorTabs li a {",
" height: 1.5em;",
"}",
"",
"div.vectorTabs {",
" height: 1.4em;",
" background-image: none;",
"}",
"",
"div#left-navigation, div#right-navigation {",
" margin-top: 3.45em;",
"}",
"",
"#ca-unwatch.icon a, #ca-watch.icon a {",
" padding-top: 1.8em;",
" background-image: none;",
" position: relative;",
"}",
"",
"div.vectorMenu h3 span {",
" padding-top: 0.5em;",
"}",
"",
"div.vectorMenu h3 a {",
" height: 1.5em;",
"}",
"",
"div#mw-head div.vectorMenu h3 {",
" height: 1.5em;",
"}",
"",
"div.vectorMenu div.menu {",
" top: 1.5em;",
"}",
"",
"div.vectorTabs ul li {",
" border-top: 1px solid #bbb;",
" border-left: 1px solid #bbb;",
" border-right: 1px solid #bbb;",
" border-bottom: 1px solid #bbb;",
" margin-left: -1px;",
"}",
"",
"div.vectorTabs li.selected a, div.vectorTabs li.selected a:visited {",
" height: 1.75em;",
"}",
"",
"div.vectorTabs li.selected {",
" position: relative;",
" top: -0.15em;",
" height: 1.65em;",
" background-image: none;",
" background-color: #fff;",
" border-bottom: 0;",
"}",
"",
"",
"#p-search form, #p-search input {",
" margin-top: 0;",
"}",
"",
"div#simpleSearch {",
" margin-top: 0;",
"}",
"",
"div.vectorTabs ul li, div.vectorTabs li.selected {",
" background-image: none;",
"}",
"",
"div.vectorTabs span {",
" background-image: none;",
"}",
"",
"",
"#ca-edit span a, #ca-talk span a {",
" border: 0;",
"}",
"",
"#ca-unwatch.icon a::after, #ca-watch.icon a::after {",
" content: \'\\f006\';",
" font-family: FontAwesome;",
" font-size: 1.3em;",
" line-height: 1.5em;",
" text-align: center;",
" display: block;",
" height: 100%;",
" width: 100%;",
" position: absolute;",
" top: 0;",
" left: 0;",
" color: #999;",
"}",
"",
"#ca-unwatch.icon a::after {",
" content: \'\\f005\';",
" color: #71DEFF;",
"}",
"",
"",
"#toc #toctitle, .toc #toctitle, #toc .toctitle, .toc .toctitle {",
" text-align: left;",
"}"
].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);
}
}
})();