Greasy Fork is available in English.
精简笔趣阁一类模板小说网站的阅读页面
当前为
// ==UserScript==
// @name 笔趣阁类小说网站阅读页精简
// @namespace http://tampermonkey.net/
// @version 0.5.1
// @description 精简笔趣阁一类模板小说网站的阅读页面
// @author miko
// @include /.*www\.xbiquge\.la\/\d+\/\d+\/\d+\.html/
// @include /.*www\.xsbiquge\.com\/\d+_\d+\/\d+\.html/
// @include *://www.ciymao.com/chapter/*/*.html
// @include /.*www.biquge.info\/\d+_\d+\/\d+\.html/
// @include /.*www\.bqg44\.net\/book\/\d+\/\d+\.html/
// @include /.*www\.shubao2s\.net\/\d+_\d+\/\d+\.html/
// @homepageURL http://greasyfork.icu/zh-CN/scripts/396935-笔趣阁类小说网站阅读页精简
// @note V0.5.1--对新增匹配网站的翻页按钮及其字体颜色做了适配。(就是加了一个class)
// @note V0.5--新增匹配四个网址,都是自己翻到啥小说网站,一看没美化,就现加的。
// @note V0.4--删除正文底部文字广告
// @note V0.4--修改翻页按钮字体颜色
// @note V0.4--修改网页在宽度990px以下出现横向滚动条的bug
// @note V0.3--新增匹配一个网址,新增清除网页js加入的广告
// @note V0.2--更改了滚动条样式和文本选中颜色
// @grant none
// ==/UserScript==
(function() {
'use strict';
function $(id){return document.getElementById(id)}
var h1 = document.getElementsByTagName('h1')[0];
var content = $('content');
var bottem=document.getElementsByClassName('bottem1')[0];
if(content==null){
content=document.getElementsByClassName('content')[0]
}
if(bottem==undefined){
bottem = document.getElementsByClassName('bottem')[0]
}
if(bottem==undefined){
bottem = document.getElementsByClassName('bottem2')[0]
}
if(bottem==undefined){
bottem = document.getElementsByClassName('read_nav')[0]
console.log("read_nav")
}
bottem.style="width:90% !important;color:#dd9999 !important"
console.log(content)
console.log(bottem.getElementsByTagName('a'))
if(content.getElementsByTagName('p')[0]){
content.getElementsByTagName('p')[0].innerHTML="";
}
if(bottem.getElementsByTagName('a').length>3){
bottem.getElementsByTagName('a')[0].innerHTML="";
bottem.getElementsByTagName('a')[4].innerHTML="";
if(bottem.getElementsByTagName('a').length==6){
bottem.getElementsByTagName('a')[5].innerHTML="";
}
}
document.body.innerHTML="";
h1.style="color:#dd9999;";
var div=document.createElement('div');
div.style="margin:0 auto ;width:70%";
div.appendChild(h1);
div.innerHTML=div.innerHTML+"<br/>"
div.appendChild(content);
div.appendChild(bottem);
var style=document.createElement('style');
style.innerHTML="::selection {color:#fff;background-color: #5FB878 ;}::-moz-selection {color:#fff; background-color: #5FB878 ;}::-webkit-selection {color:#fff;background-color: #5FB878 ;}body::-webkit-scrollbar{width: 8px;height: 8px} body::-webkit-scrollbar-track{border-radius: 5px;background: #fff;}body::-webkit-scrollbar-thumb{background: #5FB878;border-radius: 5px;}"
style.innerHTML=style.innerHTML+".bottem2,.bottem1,.read_nav{color:#dd9999 !important;width:80% !important}.bottem2 a,.bottem1 a,.read_nav a{color:#dd9999 !important}"
style.type="text/css"
document.body.appendChild(style);
document.body.appendChild(div);
document.body.style="background-color:#555;color:#cccccc;line-height:40px !important"
content.style="font-size:20px;"
//清除广告
var node = document.createElement("style");
node.type = "text/css";
node.appendChild(document.createTextNode("#cs_right_bottom,#_cs_bf_item{display:none !important}"));
var heads = document.getElementsByTagName("head");
if (heads.length > 0) {
heads[0].appendChild(node);
}
var bodys = document.getElementsByTagName("body");
if (bodys.length > 0) {
bodys[0].appendChild(node);
}
})();