// ==UserScript== // @name 小说阅读模式 // @namespace https://viayoo.com/ // @version 220505.21 // @description 按钮开关“[Ξ]”是上滑隐藏、下滑显示的,进入阅读模式后的设置按钮“M”同。 // @author You // @license MIT // @run-at document-end // @match *://*/* // @grant none // @downloadURL https://update.greasyfork.icu/scripts/504352/%E5%B0%8F%E8%AF%B4%E9%98%85%E8%AF%BB%E6%A8%A1%E5%BC%8F.user.js // @updateURL https://update.greasyfork.icu/scripts/504352/%E5%B0%8F%E8%AF%B4%E9%98%85%E8%AF%BB%E6%A8%A1%E5%BC%8F.meta.js // ==/UserScript== !function() { /*【参考】:阅读模式→酷安@fangsiyuan《纯文本阅读模式》;按钮隐藏→酷安@谷花泰《仿酷安回到顶部/底部(增强版)》;主题→话本小说网;酷安@石头VS影子 提供历史记录方法……感谢评论区的建议反馈*/ var zhdx = 20; /*20为字体初始大小*/ var zhcz = 6; /*6为字行差值,该值与字体大小之和作为行高*/ var zhbj = 4; /*4为显示边距*/ var cszt = "#e3edcd-#000"; /*初始主题,主题格式:背景色-字体颜色。单独颜色值则为背景色且字体为黑色*/ var ztss = "#FFCBE8-#C71585;#fce4ec-#880e4f;#CCE2BF-green;#e0f2f1-#004d40;#e1f5fe-#01579b;#494949-#C1C1C1;#1a1c23-#c6c7c8;#000000-#bbbbbb;#C7EDCC;#DCECD2;#f4f0e9;#fff"; /*本脚本所有主题集,主题之间“;”隔开*/ var $ = function(e) { return document.querySelector(e) }, ydcss = "display:none;text-align:center !important;font-size:20px;width:28px;height:28px;line-height:28px;text-align:center;float:right;position:fixed;right:10px;top:70%;color:#000;opacity:0.8;background:#e3edcd;cursor:pointer;position:fixed !important;z-index:9999999999 !important;box-shadow:0px 1px 1px #000;border-radius:50%;"; if (!$("#txtyd")) { var ydan = document.createElement("span"); ydan.id = "txtyd"; ydan.innerHTML = "[\u039e]"; ydan.style.cssText = ydcss; ydan.addEventListener("click", function() { jryd() }); $("body").appendChild(ydan); } var hdy1, hdy2; document.addEventListener("touchstart", function(e) { hdy1 = e.changedTouches[0].clientY }); document.addEventListener("touchmove", function(e) { hdy2 = e.changedTouches[0].clientY; $("#txtyd").style.display = hdy2 - hdy1 > 0 ? "block": "none" }); function jryd() { var wybm = document.characterSet, wyt = '

M'; var newy = window.open('', '_self'); newy.opener = null; newy.document.write(wyt); newy.document.close(); var cpfy = document.createElement("script"); cpfy.innerHTML = '$("#xsxs").addEventListener("click",function(e){e.clientY0?($("#txtcd").style.display="block",tcdzt=1):yctcd()});function yctcd(){"1"==tcdzt&&($("#txtcd").style.display="none",$("#szcsp").style.display="none",tcdzt=0)};$("#txtcd").addEventListener("click",function(){$("#szcsp").style.display="block";tcdzt=1}),$("#csztjx").addEventListener("click",function(){var t=tztdx-1;t>9&&szztdx(t)}),$("#csztzd").addEventListener("click",function(){var t=1*tztdx+1;t<41&&szztdx(t)});cjztan();szzt(mrzt);function cjztan(){for(var t=xsztys.split(";"),e=0;e