Readable Wikipedia

Makes wikipedia easier to read (smaller line length, cleaner). See https://github.com/nixterrimus/readable-wikipedia.

目前為 2017-11-15 提交的版本,檢視 最新版本

// ==UserScript==
// @name        Readable Wikipedia
// @description Makes wikipedia easier to read (smaller line length, cleaner). See https://github.com/nixterrimus/readable-wikipedia.
// @namespace   https://github.com/nixterrimus/readable-wikipedia
// @include     http*://*.wikipedia.org/**
// @version     1.0
// @resource    readableWikipediaCss https://raw.github.com/nixterrimus/readable-wikipedia/master/readable.css
// @grant       GM_addStyle
// @grant       GM_getResourceText
// ==/UserScript==

var cssSrc = GM_getResourceText ("readableWikipediaCss");
GM_addStyle (cssSrc);

document.getElementById("References").parentNode.nextSibling.nextSibling.style.display = "none" 

addStyle(
   "body{-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;-o-hyphens:auto;hyphens:auto; text-align:justify}" +
   "a, a:visited {color: rgb(43, 119, 189) !important}" + 
   "#mw-head {display: none}" + 
   "div#content {width: 600px !important; padding-top: 1em !important}"
)

function addStyle(styleString) {
	var style = dom("<style type='text/css'>" + styleString + "</style>")
	var head = document.getElementsByTagName('head')[0]
	head.appendChild(style);
}

function dom(nodeString) {
	var div = document.createElement('div');
	div.innerHTML = nodeString
	return div.firstChild
}

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址