新增 [淘股吧] 支持

This commit is contained in:
xiu2
2021-11-17 10:10:34 +08:00
parent c70f9e1e48
commit 847a0c6499
+67 -2
View File
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 自动无缝翻页
// @version 3.4.6
// @version 3.4.7
// @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、片库、茶杯狐、NO视频、低端影视、奈菲影视、音范丝、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、极简插件、小众软件、动漫狂、漫画猫、漫画 DB、动漫之家、拷贝漫画、包子漫画、古风漫画网、Mangabz、PubMed、GreasyFork、Github、StackOverflow(以上仅一小部分,更多的写不下了...
// @match *://*/*
@@ -29,7 +29,7 @@
['menu_discuz_thread_page', '帖子内自动翻页', '帖子内自动翻页', true],
['menu_page_number', '显示当前页码及点击暂停翻页', '显示当前页码及点击暂停翻页', true],
['menu_pause_page', '左键双击网页空白处暂停翻页', '左键双击网页空白处暂停翻页', false]
], menuId = [], webType = 0, curSite = {SiteTypeID: 0}, DBSite, SiteType, pausePage = true, pageNum = {now: 1, _now: 1}, locationChange = false, nowLocation = '', forumWebsite = ['cs.rin.ru', 'www.flyert.com', 'bbs.pediy.com', 'www.libaclub.com', 'tieba.baidu.com', 'www.cadtutor.net', 'www.theswamp.org', 'www.xuexiniu.com', 'bbs.xuexiniu.com'];
], menuId = [], webType = 0, curSite = {SiteTypeID: 0}, DBSite, SiteType, pausePage = true, pageNum = {now: 1, _now: 1}, locationChange = false, nowLocation = '', forumWebsite = ['cs.rin.ru', 'www.flyert.com', 'bbs.pediy.com', 'www.libaclub.com', 'tieba.baidu.com', 'www.cadtutor.net', 'www.theswamp.org', 'www.xuexiniu.com', 'bbs.xuexiniu.com', 'www.taoguba.com.cn'];
for (let i=0;i<menuAll.length;i++){ // 如果读取到的值为 null 就写入默认值
if (GM_getValue(menuAll[i][0]) == null){GM_setValue(menuAll[i][0], menuAll[i][3])};
}
@@ -1087,6 +1087,71 @@
scrollD: 1200
}
}, // 篱笆网论坛 - 搜索页
taoguba: {
host: 'www.taoguba.com.cn',
functionStart: function() {insStyle('#joinTGB {display: none !important;}')
if (location.pathname.indexOf('/Article/') > -1) {
curSite = DBSite.taoguba_t;
} else if (location.pathname.indexOf('/shenghuoba/') > -1) {
curSite = DBSite.taoguba_;
} else if (/\/bbs|zongban|dianzan|jinghua\//.test(location.pathname)) {
curSite = DBSite.taoguba;
}},
pager: {
type: 1,
nextL: function() {
let next = getXpath('//div[contains(@class, "t_page01")]/a[contains(text(), "下一页")]'), next_ = '/';
if (next) {
next = next.getAttribute('onclick').replace('gotoPage(','').replace(')','').split(',');
if (/\/dianzan|jinghua\//.test(location.pathname)) next_ = '-';
if (parseInt(next[0]) <= parseInt(next[2])) {return (`${location.origin}/${location.pathname.split('/')[1]}/${next[0]}${next_}${next[1]}`)}
}
return '';
},
pageE: 'css;.p_list > .p_list01[class*="user_"]',
insertP: ['//div[@class="p_list"][./div[contains(@class, "user_")]]', 3],
replaceE: 'css;.t_page',
scrollD: 1000
}
}, // 淘股吧论坛
taoguba_: {
pager: {
type: 1,
nextL: function() {
let next = getCSS('#N_go_pageBtn'), next_ = location.pathname.split('/')[2].split('-')[0];
if (next && (parseInt(next.dataset.now) + 1 <= parseInt(next.dataset.total))) {
if (!next_) next_ = 'H';
return (`${location.origin}/shenghuoba/${next_}-${parseInt(next.dataset.now) + 1}`)
}
return '';
},
pageE: 'css;.lifeContent-topicList-item',
insertP: ['//div[@class="lifeContent-topicList"]//div[@class="lifeContent-topicList-item"][last()]', 4],
replaceE: 'css;.N_sortPage ',
scrollD: 1000
}
}, // 淘股吧论坛 - 生活圈
taoguba_t: {
pager: {
type: 1,
nextL: function() {
let next = getXpath('//div[contains(@class, "t_page01")]/a[contains(text(), "下一页")]');
if (next) {
next = next.getAttribute('onclick').replace('gotoPageTopic(','').replace(')','').split(',');
if (parseInt(next[0]) <= parseInt(next[1])) {return (`${location.origin}/Article/${getCSS("#looktopicID").value}/${next[0]}`)}
}
return '';
},
pageE: 'css;div[id^="reply_"]',
insertP: ['css;#new_wrap_container', 3],
replaceE: 'css;.t_page',
scrollD: 1000
},
function: {
bF: src_bF,
pF: [0, 'img[data-original]', 'data-original']
}
}, // 淘股吧论坛 - 帖子内
lowendtalk: {
host: 'lowendtalk.com',
pager: {