Greasy Fork is available in English.

笔趣阁类小说网站阅读页精简

精简笔趣阁一类模板小说网站的阅读页面

目前为 2020-06-23 提交的版本。查看 最新版本

// ==UserScript==
// @name         笔趣阁类小说网站阅读页精简
// @namespace    http://tampermonkey.net/
// @version      0.4
// @description  精简笔趣阁一类模板小说网站的阅读页面
// @author       miko
// @include      /.*www\.xbiquge\.la\/\d+\/\d+\/\d+\.html/
// @include      /.*www\.xsbiquge\.com\/\d+_\d+\/\d+\.html/

// @homepageURL  https://greasyfork.org/zh-CN/scripts/396935-笔趣阁类小说网站阅读页精简
// @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('bottem2')[0];
    content.getElementsByTagName('p')[0].innerHTML="";
    bottem.getElementsByTagName('a')[0].innerHTML="";
    bottem.getElementsByTagName('a')[4].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{color:#dd9999 !important;width:80% !important}.bottem2 a{color:#dd9999 !important}"
    style.type="text/css"
    document.body.appendChild(style);
    document.body.appendChild(div);
    document.body.style="background-color:#555;color:#cccccc;"
    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);
    }



})();