From bc0968a3c69a7a087670cff83894dfc527ef69e0 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Fri, 4 Mar 2022 12:40:46 +0800 Subject: [PATCH 0001/1335] =?UTF-8?q?=E7=A7=BB=E9=99=A4=20[=E7=B3=97?= =?UTF-8?q?=E4=BA=8B=E7=99=BE=E7=A7=91]=20=E6=94=AF=E6=8C=81=20(=E7=BD=91?= =?UTF-8?q?=E9=A1=B5=E7=89=88=E5=85=B3=E4=BA=86);=20=E4=BC=98=E5=8C=96=20[?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95]=20?= =?UTF-8?q?=E5=8A=9F=E8=83=BD;=20=E4=BC=98=E5=8C=96=20=E4=BB=A3=E7=A0=81;?= =?UTF-8?q?=20=E8=B0=83=E6=95=B4=20=E9=83=A8=E5=88=86=E8=A7=84=E5=88=99?= =?UTF-8?q?=E8=87=B3=20[=E5=A4=96=E7=BD=AE=E7=BF=BB=E9=A1=B5=E8=A7=84?= =?UTF-8?q?=E5=88=99]=20=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 834 +------------------------------------- other/Autopage/rules.json | 787 ++++++++++++++++++++++++++++++++--- 2 files changed, 746 insertions(+), 875 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index 567513368..80c3ae4fc 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -3,7 +3,7 @@ // @name:zh-CN 自动无缝翻页 // @name:zh-TW 自動無縫翻頁 // @name:en AutoPager -// @version 5.1.6 +// @version 5.1.7 // @author X.I.U // @description 无缝追加下一页内容(瀑布流),目前支持:【所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、NexusPHP」论坛】【百度、谷歌、必应、搜狗、微信、360、Yahoo、Yandex 等搜索引擎】、贴吧、豆瓣、知乎、微博、NGA、V2EX、B 站(Bilibili)、煎蛋网、糗事百科、龙的天空、起点中文、IT之家、千图网、Pixabay、Pixiv、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、小众软件、【动漫狂、漫画猫、漫画屋、漫画 DB、动漫之家、拷贝漫画、包子漫画、Mangabz、Xmanhua 等漫画网站】、PubMed、Z-Library、GreasyFork、Github、StackOverflow(以上仅一小部分,更多的写不下了... // @description:zh-TW 無縫追加下一頁內容(瀑布流),支持各論壇、社交、遊戲、漫畫、小說、學術、搜索引擎等網站~ @@ -121,9 +121,9 @@ } else { // 自定义翻页规则时,因为同域名不同页面 url 分开写,所以如果没找到就需要跳出当前数组循环,继续规则循环 try { if (DBSite[now].url.slice(0,1) === '/') { // 如果是正则,则对 URL 路径进行匹配 - if (new RegExp(DBSite[now].url.slice(1,DBSite[now].url.length-1), 'i').test(location.pathname + location.search) === true) {curSite = DBSite[now];} else {break;} + if (new RegExp(DBSite[now].url.slice(1,DBSite[now].url.length-1), 'i').test(location.pathname + location.search) === true) {curSite = DBSite[now];} else {if (urlC === true) {support = true;}; break;} } else { // 如果是函数,那就执行代码 - if (new Function('fun', DBSite[now].url)(window.autoPage) === true) {curSite = DBSite[now];} else {if (urlC !== true) {break;}} + if (new Function('fun', DBSite[now].url)(window.autoPage) === true) {curSite = DBSite[now];} else {if (urlC === true) {support = true;}; break;} } } catch (e) { console.error('[自动无缝翻页] - 当前网页规则 "url" 有误,请检查!', e); @@ -149,10 +149,10 @@ } else { // 自定义翻页规则时,因为同域名不同页面 url 分开写,所以如果没找到就需要继续规则循环 try { if (DBSite[now].url.slice(0,1) === '/') { // 如果是正则,则对 URL 路径进行匹配 - if (new RegExp(DBSite[now].url.slice(1,DBSite[now].url.length-1), 'i').test(location.pathname + location.search) === true) {curSite = DBSite[now];} else {continue;} + if (new RegExp(DBSite[now].url.slice(1,DBSite[now].url.length-1), 'i').test(location.pathname + location.search) === true) {curSite = DBSite[now];} else {if (urlC === true) {support = true;}; continue;} } else { // 如果是函数,那就执行代码 - if (new Function('fun', DBSite[now].url)(window.autoPage) === true) {curSite = DBSite[now];} else {if (urlC !== true) {continue;}} + if (new Function('fun', DBSite[now].url)(window.autoPage) === true) {curSite = DBSite[now];} else {if (urlC === true) {support = true;}; continue;} } } catch (e) { @@ -602,788 +602,6 @@ function: { scrollD: 1000 } }, // 百度贴吧 - 搜索页 - douban_subject_comments: { - host: 'movie.douban.com', - url: ()=> {if (indexOF('/subject/') && indexOF('/comments')) { - curSite = DBSite.douban_subject_comments; - } else if (indexOF('/subject/') && indexOF('/reviews')) { - curSite = DBSite.douban_subject_reviews; - } else if(indexOF('/subject/') && indexOF('/episode') || indexOF('/subject/') && indexOF('/tv_discuss')) { - curSite = DBSite.douban_subject_episode; - } else if(indexOF('/people/') && indexOF('/collect')) { - curSite = DBSite.douban_people_collect; - } else if(indexOF('/celebrity/') && indexOF('/movies')) { - curSite = DBSite.douban_celebrity_movies; - }}, - pager: { - nextL: 'a.next', - pageE: '#comments > .comment-item', - replaceE: '#paginator', - scrollD: 1500 - } - }, // 豆瓣 - 短评 - douban_subject_reviews: { - pager: { - nextL: 'link[rel="next"]', - pageE: '.review-list > div', - replaceE: '.paginator', - scrollD: 1500 - } - }, // 豆瓣 - 影评 - douban_subject_episode: { - pager: { - nextL: 'link[rel="next"]', - pageE: '#comments > div', - replaceE: '.paginator', - scrollD: 1500 - } - }, // 豆瓣 - 剧评 - douban_people_collect: { - pager: { - nextL: 'link[rel="next"]', - pageE: '.grid-view > div', - replaceE: '.paginator', - scrollD: 1500 - } - }, // 豆瓣 - 看过的电影 - douban_celebrity_movies: { - pager: { - nextL: 'link[rel="next"]', - pageE: '.grid_view > ul > li', - replaceE: '.paginator', - scrollD: 1500 - } - }, // 豆瓣 - 作品 - douban_group: { - host: 'www.douban.com', - url: ()=> {if (indexOF('/group/topic/')) { - curSite = DBSite.douban_group_topic; - } else if (indexOF('/group/explore')) { - curSite = DBSite.douban_group_explore; - } else if (indexOF('/group/') && indexOF('/discussion')) { - curSite = DBSite.douban_group; - }}, - pager: { - nextL: 'span.next > a', - pageE: 'table.olt > tbody > tr:not(.th)', - replaceE: '.paginator', - scrollD: 1500 - } - }, // 豆瓣 - 小组 - douban_group_explore: { - pager: { - nextL: 'span.next > a', - pageE: '#content .article > div > .channel-item', - replaceE: '.paginator', - scrollD: 1500 - } - }, // 豆瓣 - 小组讨论精选 - douban_group_topic: { - thread: true, - pager: { - nextL: 'span.next > a', - pageE: '#comments > li', - replaceE: '.paginator', - scrollD: 1500 - } - }, // 豆瓣 - 小组帖子内 - zhihu: { - host: 'www.zhihu.com', - url: ()=> {urlC = true; if (indexOF(/\/people\/.+\/.+/) || indexOF('/collection/')) {curSite = DBSite.zhihu; if (self != top) insStyle('#ProfileHeader {display: none !important;}')}}, - forceTarget: true, - iframe: true, - pager: { - type: 5, - nextL: ()=> { - let next = getCSS('.Pagination .PaginationButton--current+button:not(.PaginationButton-next)'); - if (next) return (location.origin + location.pathname + '?page=' + next.textContent) - }, - scrollD: 2000 - } - }, // 知乎 - 用户主页、收藏夹 - weibo_comment: { - host: 'weibo.com', - pager: { - type: 2, - nextL: 'a[action-type="click_more_comment"]', - nextText: '查看更多c', - scrollD: 1000 - } - }, // 微博评论 - tianya: { - host: 'bbs.tianya.cn', - url: ()=> {if (indexOF('/list')) { - curSite = DBSite.tianya; - } else if (indexOF('/post')) { - curSite = DBSite.tianya_post; - }}, - pager: { - nextL: '//div[contains(@class, "pages")]/div[@class="links"]/a[text()="下一页"]', - pageE: '.tab-bbs-list > tbody:not(:first-of-type)', - replaceE: '//div[contains(@class, "pages")]', - scrollD: 1500 - } - }, // 天涯社区 - tianya_post: { - thread: true, - pager: { - nextL: 'a.js-keyboard-next', - pageE: '.atl-main > div[class="atl-item"]', - replaceE: '.atl-pages > form', - scrollD: 2000 - } - }, // 天涯社区 - 帖子内 - hupu: { - host: 'bbs.hupu.com', - url: ()=> {if (indexOF('.html')) { - curSite = DBSite.hupu_post; - } else if (lp != '/' && !indexOF('/all-')) { - curSite = DBSite.hupu; - }}, - pager: { - nextL: ()=> {let next = getCSS('li.hupu-rc-pagination-item-active+li.hupu-rc-pagination-item > a');if (next) {return (location.origin + location.pathname.replace(/-\d+/,'') + '-' + next.textContent)} else {return ''}}, - pageE: 'li.bbs-sl-web-post-body', - replaceE: 'ul.hupu-rc-pagination', - scrollD: 1500 - } - }, // 虎扑社区 - hupu_post: { - thread: true, - pager: { - nextL: 'li.hupu-rc-pagination-next > a', - pageE: '.post-reply-list ', - replaceE: 'ul.hupu-rc-pagination', - scrollD: 2000 - } - }, // 虎扑社区 - 帖子内 - nga_thread: { - host: ['bbs.nga.cn', 'ngabbs.com', 'nga.178.com', 'g.nga.cn'], - iframe: true, - url: ()=> {urlC = true; - if (lp == '/thread.php') { - curSite = DBSite.nga_thread; - } else if (lp == '/read.php') { - curSite = DBSite.nga_read; - }}, - pager: { - nextL: '#pagebbtm a[title="下一页"]', - pageE: '#topicrows > tbody, #topicrows > script', - insertP: ['#topicrows', 3], - replaceE: 'div[name="pageball"]', - scriptT: 2, - scrollD: 1000 - }, - function: { - aF: ()=> {document.body.appendChild(document.createElement('script')).textContent = 'commonui.topicArg.loadAll();';} - } - }, // NGA - 各版块帖子列表 - nga_read: { - history: false, - thread: true, - retry: 1000, - pager: { - nextL: '#pagebbtm a[title*="下一页"]', - pageE: 'id("m_posts_c")/table | id("m_posts_c")/script | //script[contains(text(), "commonui.userInfo.setAll")]', - insertP: ['#m_posts_c', 3], - replaceE: 'div[name="pageball"]', - scriptT: 2, - scrollD: 1000 - } - }, // NGA - 帖子内 - v2ex_recent: { - host: ['v2ex.com', 'www.v2ex.com'], - url: ()=> {if (lp == '/') { - v2ex_aF('#Main a.topic-link:not([target])'); - } else if (lp == '/recent') { - curSite = DBSite.v2ex_recent; - v2ex_aF('#Main a.topic-link:not([target])'); - } else if (lp == '/notifications') { - curSite = DBSite.v2ex_notifications; - v2ex_aF('#Main a[href^="/t/"]:not([target])'); - } else if (lp == '/balance') { - curSite = DBSite.v2ex_balance; - } else if (indexOF('/go/')) { - curSite = DBSite.v2ex_go; - v2ex_aF('#Main a.topic-link:not([target])'); - } else if (indexOF('/replies')) { - curSite = DBSite.v2ex_replies; - v2ex_aF('#Main a[href^="/t/"]:not([target])'); - }}, - pager: { - nextL: 'a.page_current+a.page_normal', - pageE: '.cell.item', - replaceE: '#Main > .box > .cell[style]:not(.item) > table', - scrollD: 1500 - }, - function: { - aF: v2ex_aF, - aFp: '#Main a.topic-link:not([target])' - } - }, // V2EX - 最近主题页 - v2ex_notifications: { - pager: { - nextL: 'a.page_current+a.page_normal', - pageE: '#notifications > div', - replaceE: '#Main > .box > .cell[style] > table', - scrollD: 1500 - }, - function: { - aF: v2ex_aF, - aFp: '#Main a[href^="/t/"]:not([target])' - } - }, // V2EX - 提醒消息页 - v2ex_replies: { - pager: { - nextL: 'a.page_current+a.page_normal', - pageE: '//div[@id="Main"]//div[@class="box"]//div[@class="dock_area"] | //*[@id="Main"]//div[@class="box"]//div[@class="inner"] | //*[@id="Main"]//div[@class="box"]//div[@class="dock_area"][last()]/following-sibling::div[@class="cell"][1]', - insertP: ['//div[@id="Main"]//div[@class="box"]//div[@class="cell"][last()]', 1], - replaceE: '#Main > .box > .cell[style] > table', - scrollD: 1500 - }, - function: { - aF: v2ex_aF, - aFp: '#Main a[href^="/t/"]:not([target])' - } - }, // V2EX - 用户回复页 - v2ex_go: { - pager: { - nextL: 'a.page_current+a.page_normal', - pageE: '#TopicsNode > div', - replaceE: '#Main > .box > .cell[style] > table', - scrollD: 1500 - }, - function: { - aF: v2ex_aF, - aFp: '#Main a.topic-link:not([target])' - } - }, // V2EX - 分类主题页 - v2ex_balance: { - pager: { - nextL: 'a.page_current+a.page_normal', - pageE: '#Main .box > div:not(.cell) > table > tbody > tr:not(:first-child)', - replaceE: '#Main > .box > .cell[style] > table', - scrollD: 1000 - } - }, // V2EX - 账户余额页 - jandan: { - host: 'jandan.net', - url: ()=> {if (lp == '/' || indexOF('/page/')) { - curSite = DBSite.jandan; - } else if (lp == '/dzh') { - curSite = DBSite.jandan_dzh; - } else { - curSite = DBSite.jandan_comment; - }}, - style: '#nav_prev, #nav_next, .post.f:not(.list-post) {display: none !important;}', - history: false, - pager: { - nextL: '//div[@class="wp-pagenavi"]/a[contains(text(), "下一页") or contains(text(), "更多文章")]', - pageE: '#content > .list-post', - replaceE: '.wp-pagenavi', - scrollD: 1500 - }, - function: { - bF: src_bF, - bFp: [0, 'img[data-original]', 'data-original'] - } - }, // 煎蛋网 - jandan_comment: { - style: '#nav_prev, #nav_next, #tucao-gg {display: none !important;} .jandan-vote a.tucao-btn23:link {color: #c8c7cc !important;} .jandan-tucao {background-color: #fafaf9 !important;}', - pager: { - nextL: 'a.previous-comment-page', - pageE: 'ol.commentlist > li[id^="comment-"], script[src^="//cdn.jandan.net/static/min/"]', - insertP: ['ol.commentlist', 3], - replaceE: '.cp-pagenavi', - scriptT: 2, - scrollD: 1500 - }, - function: { - bF: pageE => { // 插入前函数(修改当前网页中的 吐槽 等按钮,避免重复添加点击事件) - getAllCSS('a.tucao-btn').forEach(function (now) {now.className = now.className.replace('tucao-btn', 'tucao-btn23');}); - getAllCSS('a.comment-like.like').forEach(function (now) {now.className = now.className.replace('comment-like', 'comment-like23');}); - getAllCSS('a.comment-unlike.unlike').forEach(function (now) {now.className = now.className.replace('comment-unlike', 'comment-unlike23');}); - return pageE - } - } - }, // 煎蛋网 - jandan_dzh: { - history: false, - pager: { - type: 2, - nextL: '.show_more', - interval: 1500, - scrollD: 1500 - } - }, // 煎蛋网 - 大杂烩 - qiushibaike: { - host: 'www.qiushibaike.com', - url: ()=> {insStyle('.qrcode-wrap, .qrcode-wrap-img, .index-side-left-AD1 {display: none !important;}'); - if (lp == '/') { - curSite = DBSite.qiushibaike; - } else if (!indexOF('/article/')) { - curSite = DBSite.qiushibaike_; - }}, - pager: { - nextL: '//ul[@class="pagination"]//a[./span[@class="next"]]', - pageE: '.recommend-article > ul > li', - replaceE: 'ul.pagination', - scrollD: 1500 - } - }, // 糗事百科 - qiushibaike_: { - pager: { - nextL: '//ul[@class="pagination"]//a[./span[@class="next"]]', - pageE: '[id^="qiushi_tag_"]', - replaceE: 'ul.pagination', - scrollD: 1500 - } - }, // 糗事百科 - 分类页 - lkong: { - host: 'www.lkong.com', - url: ()=> {urlC = true; if (indexOF('/forum/')) { - curSite = DBSite.lkong; - } else if (indexOF('/thread/')) { - curSite = DBSite.lkong; - curSite.thread = true; - curSite.pager.pageE = '//div[@class="main-content"]/parent::div | //head/style[@data-emotion-css]'; - curSite.pager.insertP = ['//div[@class="main-content"][1]/parent::div/parent::div', 3]; - }}, - history: false, - pager: { - nextL: ()=> { // 获取下一页地址 - let next = getCSS('li.ant-pagination-next'), page; - if (next && next.getAttribute('aria-disabled') === 'false') { - page = getCSS('li.ant-pagination-item-active[title]'); - if (page && page.title) {return (location.origin + location.pathname + '?page=' + ++page.title);} - } - return ''; - }, - pageE: '//div[@class="main-title"]/parent::div/parent::div | //head/style[@data-emotion-css]', - insertP: ['//div[@class="main-title"][1]/parent::div/parent::div/parent::div', 3], - replaceE: 'ul.ant-pagination', - interval: 500, - scrollD: 1200 - } - }, // 龙的天空 - pediy_forum: { - host: 'bbs.pediy.com', - url: ()=> {if (indexOF('/forum-')) { - curSite = DBSite.pediy_forum; - } else if (indexOF('/thread-')) { - curSite = DBSite.pediy_thread; - }}, - pager: { - nextL: '//a[@class="page-link" and text()="▶"]', - pageE: 'table.threadlist > tbody > tr', - replaceE: 'ul.pagination', - scrollD: 1500 - } - }, // 看雪论坛 - 各版块帖子列表 - pediy_thread: { - thread: true, - pager: { - nextL: '//a[@class="page-link" and text()="▶"]', - pageE: 'table.postlist > tbody > tr[data-pid]', - replaceE: 'ul.pagination', - scrollD: 1500 - } - }, // 看雪论坛 - 帖子内 - bangumitv: { - host: 'bangumi.tv', - url: ()=> { - if (indexOF('/browser') || indexOF('/subject_search')) { - curSite = DBSite.bangumitv; - } else if (indexOF('/forum')) { - curSite = DBSite.bangumitv_forum; - }}, - pager: { - nextL: '//div[@class="page_inner"]/a[text()="››"]', - pageE: 'ul#browserItemList > li', - replaceE: '.page_inner', - scrollD: 1500 - } - }, // 番组计划 - bangumitv_forum: { - pager: { - nextL: '//div[@class="page_inner"]/a[text()="››"]', - pageE: '.topic_list > tbody:last-of-type > tr.topic', - replaceE: '.page_inner', - scrollD: 1500 - } - }, // 番组计划 - 小组帖子列表 - dongchedi: { - host: 'www.dongchedi.com', - url: ()=> {urlC = true; - if (indexOF('/community/')) { - curSite = DBSite.dongchedi; - }}, - pager: { - nextL: 'li.pagination-item.is-active+li > a', - pageE: '.data-wrapper > section.community-card, style', - insertP: ['.data-wrapper', 3], - replaceE: '//ul[./li[contains(@class, "pagination-item")]]', - scrollD: 2000 - }, - function: { - bF: pageE => { - pageE.forEach(function (one) { - one.querySelectorAll('.g-load-img-wrap, .tw-absolute.tw-cursor-pointer, .avatar').forEach(function (now) { - getCSS('noscript+img', now).src = getCSS('noscript > img', now).src; - }); - }); - return pageE - } - } - }, // 懂车帝论坛 - kdslife: { - host: 'club.kdslife.com', - url: ()=> { - if (indexOF('/f_')) { - curSite = DBSite.kdslife; - } else if (indexOF('/t_')) { - curSite = DBSite.kdslife_t; - }}, - pager: { - nextL: '//div[@class="fr i3_r"]/a[text()="后一页"]', - pageE: 'ul.main_List > li.i2:not(.h_bg)', - replaceE: 'ul.main_List > li.i3', - scrollD: 1000 - } - }, // 宽带山论坛 - kdslife_t: { - pager: { - nextL: '//div[@class="pages"]/a[text()=">>"]', - pageE: '#reply_list_panel > *, script[src*="ui/js/kds.js"]', - insertP: ['#reply_list_panel', 3], - replaceE: '.pages', - scriptT: 2, - scrollD: 1000 - } - }, // 宽带山论坛 - 帖子内 - libaclub: { - host: 'www.libaclub.com', - url: ()=> { - if (lp == '/' || indexOF('/date_')) { - curSite = DBSite.libaclub; - } else if (indexOF('/f_')) { - curSite = DBSite.libaclub_f; - } else if (indexOF('/t_') || indexOF('/reply_')) { - curSite = DBSite.libaclub_t; - } else if (indexOF('/prt_')) { - curSite = DBSite.libaclub_prt; - } else if (lp == '/facade.php') { - curSite = DBSite.libaclub_search; - }}, - style: 'li.ui-list-merchant-ad, .ui-nav-appImage {display: none !important;}', - pager: { - nextL: '//div[@class="ui-crumbs-more"]/a[@class="fn-link"][1]', - pageE: 'ul.ui-list > li:not(.ui-list-item-head):not(.ui-list-merchant-ad)', - replaceE: 'div.ui-crumbs-more', - scrollD: 1200 - } - }, // 篱笆网论坛 - libaclub_f: { - style: 'li.ui-list-merchant-ad, .ui-nav-appImage {display: none !important;}', - pager: { - nextL: 'a.ui-paging-next', - pageE: 'ul.ui-list > li:not(.ui-list-item-head):not(.ui-list-merchant-ad)', - replaceE: 'div.ui-paging', - scrollD: 1200 - } - }, // 篱笆网论坛 - 各版块帖子列表 - libaclub_t: { - style: 'li.ui-list-merchant-ad, .ui-nav-appImage {display: none !important;}', - pager: { - nextL: 'a.ui-paging-next', - pageE: '.ui-box-content > div.ui-topic, .ui-box-content > a[name]', - insertP: ['.ui-box-content', 3], - replaceE: 'div.ui-paging', - scrollD: 1500 - } - }, // 篱笆网论坛 - 帖子内 - libaclub_prt: { - style: 'li.ui-list-merchant-ad, .ui-nav-appImage {display: none !important;}', - pager: { - nextL: 'a.ui-paging-next', - pageE: 'ul.ui-list > li', - replaceE: 'div.ui-paging', - scrollD: 2000 - } - }, // 篱笆网论坛 - 帖子内 - 打印版 - libaclub_search: { - style: 'li.ui-list-merchant-ad, .ui-nav-appImage {display: none !important;}', - pager: { - nextL: '//div[@class="ui-page"]/a[contains(text(), "下一页")]', - pageE: '.ui-box-main > ul.ui-list > li', - replaceE: 'div.ui-page', - scrollD: 1200 - } - }, // 篱笆网论坛 - 搜索页 - taoguba: { - host: 'www.taoguba.com.cn', - url: ()=> {insStyle('#joinTGB {display: none !important;}') - if (indexOF('/Article/')) { - curSite = DBSite.taoguba_t; - } else if (indexOF('/shenghuoba/')) { - curSite = DBSite.taoguba_; - } else if (indexOF(/\/bbs|zongban|dianzan|jinghua\//)) { - curSite = DBSite.taoguba; - }}, - history: false, - pager: { - nextL: ()=> { - let next = getXpath('//div[contains(@class, "t_page01")]/a[contains(text(), "下一页")]'), next_ = '/'; - if (next) { - next = next.getAttribute('onclick').replace('gotoPage(','').replace(')','').split(','); - if (indexOF(/\/dianzan|jinghua\//)) next_ = '-'; - if (parseInt(next[0]) <= parseInt(next[2])) {return (`${location.origin}/${location.pathname.split('/')[1]}/${next[0]}${next_}${next[1]}`)} - } - return ''; - }, - pageE: '.p_list > .p_list01[class*="user_"]', - replaceE: '.t_page', - scrollD: 1000 - } - }, // 淘股吧论坛 - taoguba_: { - history: false, - pager: { - nextL: ()=> { - 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: '.lifeContent-topicList-item', - replaceE: '.N_sortPage ', - scrollD: 1000 - } - }, // 淘股吧论坛 - 生活圈 - taoguba_t: { - history: false, - thread: true, - pager: { - nextL: ()=> { - 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: 'div[id^="reply_"]', - replaceE: '.t_page', - scrollD: 1000 - }, - function: { - bF: src_bF, - bFp: [0, 'img[data-original]', 'data-original'] - } - }, // 淘股吧论坛 - 帖子内 - lowendtalk: { - host: 'lowendtalk.com', - pager: { - nextL: 'a.Next', - pageE: 'ul.DataList > li', - replaceE: '.Pager', - scrollD: 1500 - } - }, // LowEndTalk - lieyou: { - host: 'bbs.lieyou888.com', - url: ()=> {if (indexOF('/forum')) {curSite = DBSite.lieyou;}}, - pager: { - nextL: '//div[contains(@class, "_pageNav")]/a[text()="下一页"]', - pageE: 'ul.gb-bbs-list > li', - replaceE: '._pageNav', - scrollD: 1000 - }, - function: { - bF: src_bF, - bFp: [0, 'img[original]', 'original'] - } - }, // 芥子空间论坛 - xcar_forumdisplay: { - host: 'www.xcar.com.cn', - url: ()=> {if (lp == '/bbs/forumdisplay.php') {curSite = DBSite.xcar_forumdisplay}}, - pager: { - nextL: 'a.page_down', - pageE: '.table-section > dl:not(.table_head)', - replaceE: '.forumList_page', - scrollD: 2000 - } - }, // 爱卡汽车网论坛 - 各版块帖子列表 - flyert_forumdisplay: { - host: 'www.flyert.com', - url: ()=> {if (indexOF('/forum-') || indexOF('mod=forumdisplay', 's')) { - curSite = DBSite.flyert_forumdisplay; - } else if (indexOF('/forum') || indexOF('mod=viewthread', 's')) { - curSite = DBSite.flyert_viewthread; - }}, - pager: { - nextL: 'a.nxt:not([href*="javascript"])', - pageE: '#threadlist table > tbody[id^="normalthread_"]', - replaceE: '.pg', - scrollD: 2500 - } - }, // 飞客网论坛 - 各版块帖子列表 - flyert_viewthread: { - thread: true, - pager: { - nextL: 'a.nxt:not([href*="javascript"])', - pageE: '#postlist > .comiis_viewbox', - replaceE: '.comiis_pgs > .pg', - scrollD: 3000 - } - }, // 飞客网论坛 - 帖子内 - cnprint: { - host: 'www.cnprint.org', - url: ()=> {if (indexOF('/forum/')) {curSite = DBSite.cnprint;} else if (indexOF('/thread/')) {curSite = DBSite.cnprint_thread;}}, - pager: { - nextL: 'a[rel="next"]', - pageE: 'tbody[id*="threadbits_forum"] > tr', - replaceE: '.pagenav', - scrollD: 2500 - } - }, // CPC 中文印刷社区 - cnprint_thread: { - thread: true, - pager: { - nextL: 'a[rel="next"]', - pageE: '#posts > div:not([id])', - replaceE: '.pagenav', - scrollD: 2000 - } - }, // CPC 中文印刷社区 - 帖子内 - discusshk: { - host: /.+\.discuss\.com\.hk/, - url: ()=> {if (lp == '/forumdisplay.php') {curSite = DBSite.discusshk;} else if (lp == '/viewthread.php') {curSite = DBSite.discusshk_thread;}}, - pager: { - nextL: '.pagination a.next', - pageE: 'tbody[id^="normalthread_"]', - replaceE: '.pagination', - scrollD: 2000 - } - }, // 中国香港社区 - discusshk_thread: { - thread: true, - style: '.viewthread.mt-0:not(:first-of-type) .viewthread__head {display: none !important;}', - pager: { - nextL: '.pagination a.next', - pageE: '.viewthread', - replaceE: '.pagination', - scrollD: 2000 - } - }, // 中国香港论坛 - 帖子内 - tgfcer: { - host: 'bbs.tgfcer.com', - url: ()=> {if (lp == '/forumdisplay.php' || indexOF('/forum')) {curSite = DBSite.tgfcer;} else if ((lp == '/viewthread.php' || indexOF('/thread'))) {curSite = DBSite.tgfcer_thread;}}, - pager: { - nextL: '.pages a.next', - pageE: 'tbody[id^="normalthread_"]', - replaceE: '.pages', - scrollD: 2000 - } - }, // TGFC Lifestyle - tgfcer_thread: { - thread: true, - style: '.viewthread:not(:first-of-type) h1 {display: none !important;}', - pager: { - nextL: '.pages a.next', - pageE: '.viewthread', - replaceE: '.pages', - scrollD: 2000 - } - }, // TGFC Lifestyle - 帖子内 - south: { - host: [/((www|bbs)\.)?(soul|north|south|white|level|summer|spring|snow)-plus\.(net|org)/, 'bbs.imoutolove.me'], - url: ()=> { - if (lp == '/thread.php' || lp == '/search.php') { - curSite = DBSite.south; - } else if (lp == '/thread_new.php') { - curSite = DBSite.south; curSite.pager.pageE = 'li.dcsns-li'; curSite.pager.scrollD = 2000; curSite.function = {bF: src_bF,bFp: [0, 'img[data-original]', 'data-original']}; curSite.style = 'img.lazy {display: inline !important;}'; - } else if (lp == '/read.php') { - curSite = DBSite.south; curSite.thread = true; curSite.pager.pageE = 'form[name=delatc] > *:not(input)'; - } else if (lp == '/u.php' && (indexOF('action-topic-', 's') || indexOF('action-post-', 's'))) { - curSite = DBSite.south; curSite.pager.pageE = '#u-contentmain table tr'; - }}, - pager: { - nextL: '//div[@class="pages"]/ul/li[./b]/following-sibling::li[1][not(@class)]/a[not(text()="»")]', - pageE: 'tr.tr3', - replaceE: '.pages', - scrollD: 1500 - } - }, // South Plus (南+) - goddessfantasy: { - host: 'www.goddessfantasy.net', - url: ()=> { - if (indexOF('board=', 's')) { - curSite = DBSite.goddessfantasy; - } else if (indexOF('topic=', 's')) { - curSite = DBSite.goddessfantasy; curSite.pager.pageE = '#quickModForm > *'; curSite.thread = true; - }}, - pager: { - nextL: '//div[contains(@class,"pagelinks")]/a[@class="navPages" and text()="»"]', - pageE: '.table_grid > tbody > tr', - replaceE: '.pagelinks', - scrollD: 1500 - } - }, // 纯美苹果园 - adnmb3: { - host: ['adnmb3.com', 'www.tnmb.org', 'nimingban.xyz', 'nimingban.org'], - url: ()=> { - if (indexOF('/m/f/')) { - curSite = DBSite.adnmb3_mf; - } else if (indexOF('/m/t/')) { - curSite = DBSite.adnmb3_mt; - } else if (indexOF(/\/(f|Forum)\//)) { - curSite = DBSite.adnmb3; - } else if (indexOF('/t/')) { - curSite = DBSite.adnmb3_t; - }}, - pager: { - nextL: '//ul[contains(@class, "pagination")]//a[text()="下一页"]', - pageE: '.h-threads-list > *, script[src$="/h.desktop.js"]', - insertP: ['.h-threads-list', 3], - replaceE: '//ul[contains(@class, "pagination")]', - scriptT: 2, - scrollD: 2500 - } - }, // A 岛 - adnmb3_t: { - thread: true, - pager: { - nextL: '//ul[contains(@class, "pagination")]//a[text()="下一页"]', - pageE: '.h-threads-list > .h-threads-item > .h-threads-item-replys, script[src$="/h.desktop.js"]', - insertP: ['.h-threads-list > .h-threads-item', 3], - replaceE: '//ul[contains(@class, "pagination")]', - scriptT: 2, - scrollD: 2500 - } - }, // A 岛 - 帖子内 - adnmb3_mf: { - pager: { - nextL: '//li[contains(@class, "pagination-next")]//a[text()="下一页"]', - pageE: '.h-middle > div[id^="threads_"], .h-middle > hr.h-middle > div[id^="threads_"], .h-middle > hr:nth-of-type(n+2), script[src$="/h.mobile.js"]', - insertP: ['#h-threads-pagination', 1], - replaceE: '#h-threads-pagination', - scriptT: 2, - scrollD: 2500 - } - }, // A 岛 - 帖子列表(手机版) - adnmb3_mt: { - thread: true, - pager: { - nextL: '//li[contains(@class, "pagination-next")]//a[text()="下一页"]', - pageE: '.h-threads-replylist > div, script[src$="/h.mobile.js"]', - insertP: ['.h-threads-replylist', 3], - replaceE: '#h-threads-pagination', - scriptT: 2, - scrollD: 2500 - } - }, // A 岛 - 帖子内(手机版) pixiv: { host: 'www.pixiv.net', url: ()=> {urlC = true; @@ -3449,36 +2667,6 @@ function: { } - // [谷歌搜索] 的插入前函数(加载视频图片) - function google_bF(pageE) { - if (!indexOF('tbm=nws', 's')){ - pageE.forEach(function (one) { - getAllCSS('a[aria-label][href*="https://www.youtube.com/watch?v="]').forEach(function (one1) { - let img = getCSS('img', one1) - if (img) img.src = `https://i.ytimg.com/vi/${one1.href.split('?v=')[1]}/mqdefault.jpg` - }) - }); - } - return pageE - } - - - // [必应搜索] 的插入前函数(加载网站图标) - function bing_bF(pageE) { - if (!getCSS('.b_title > a.sh_favicon')) { - insStyle('.b_title > a.sh_favicon {display: none !important;}'); - delete curSite.function - //console.log(curSite) - return pageE - } - pageE.forEach(function (one) { - getAllCSS('div.rms_iac[data-src]').forEach(function (one1) { - one1.outerHTML = `全球 Web 图标`; - }) - }); - return pageE - } - // [百度贴吧](发帖按钮点击事件) function baidu_tieba_1() { @@ -4567,7 +3755,7 @@ function: { if (!curSite.pager.insertP) {curSite.pager.insertP = [curSite.pager.pageE, 5]} let pageE = getAll(curSite.pager.pageE, response, response), toE; if (curSite.pager.insertP[1] === 5) { // 插入 pageE 列表最后一个元素的后面 - toE = getAll(curSite.pager.insertP[0]).pop(); + toE = toE5pop(getAll(curSite.pager.insertP[0])); } else { toE = getOne(curSite.pager.insertP[0]); } @@ -4837,9 +4025,9 @@ function: { //console.log(pageE.querySelector('title'), curSite.pageUrl) title = title || pageE.querySelector('title').textContent || window.top.document.title; url = url || curSite.pageUrl; - window.top.document.title = title; window.top.document.xiu_nowUrl = curSite.pageUrl; window.top.history.pushState('xiu_history', title, url); + window.top.document.title = title; } // 插入