优化 [W3school]、[菜鸟教程] 规则

This commit is contained in:
xiu2
2021-11-07 13:24:40 +08:00
parent 2b54e2ae64
commit e0bbf7a1f4
+6 -6
View File
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 自动无缝翻页
// @version 3.3.0
// @version 3.3.1
// @author X.I.U
// @description 无缝拼接下一页内容(瀑布流),目前支持:[所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、DUX/XIU/D8/Begin(WP主题)」网站]、百度、谷歌、必应、搜狗、头条搜索、360 搜索、微信搜索、贴吧、豆瓣、微博、NGA、V2EX、B 站(Bilibili)、蓝奏云、煎蛋网、糗事百科、龙的天空、起点小说、IT之家、千图网、Pixabay、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、FitGirl、片库、茶杯狐、NO视频、低端影视、奈菲影视、91美剧网、音范丝、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、极简插件、小众软件、动漫狂、漫画猫、漫画DB、动漫之家、古风漫画网、PubMed、wikiHow、GreasyFork、Github、StackOverflow(以上仅一小部分,更多的写不下了...
// @match *://*/*
@@ -3677,8 +3677,8 @@
pager: {
type: 3,
nextL: function() { // 过滤部分非本页的参考手册
let next = document.querySelector('li.next > a')
if (next.href.indexOf('/index.') === -1) return next.href;
let next = document.querySelector('li.next > a[href]')
if (next && next.href.indexOf('/index.') === -1) return next.href;
curSite = {SiteTypeID: 0}; return ''
},
pageE: 'css;#maincontent > *:not(.prenextnav):not(#bpn):not(#tpn)',
@@ -3692,13 +3692,13 @@
}, // W3school
runoob: {
host: 'www.runoob.com',
functionStart: function() {if (location.pathname.split('/').length > 2) {curSite = DBSite.runoob;}},
functionStart: function() {if (location.pathname.split('/').length > 2 && document.getElementById('leftcolumn')) {curSite = DBSite.runoob;}},
insStyle: '#comments, #postcomments, #respond, #footer {display: none !important;} .article-intro h1:not(:nth-of-type(1)) {margin: 30px 0 10px 0;}',
pager: {
type: 1,
nextL: function() { // 过滤部分非本页的参考手册
let next = document.querySelector('#leftcolumn > a[style]~a')
if (next.href.split('/').length === location.href.split('/').length && next.href.split('/')[3] === location.href.split('/')[3]) return next.href;
let next = document.querySelector('#leftcolumn > a[style]~a[href]')
if (next && next.href.split('/').length === location.href.split('/').length && next.href.split('/')[3] === location.href.split('/')[3]) return next.href;
next.href = location.href; curSite = {SiteTypeID: 0}; return ''
},
pageE: 'css;#content > *',