自动无缝翻页

无缝拼接下一页内容(瀑布流),目前支持:[所有使用「Discuz!、Flarum、DUX(WordPress)」的网站]、百度、谷歌、必应、搜狗、头条搜索、360 搜索、微信搜索、贴吧、豆瓣、微博、NGA、V2EX、龙的天空、起点小说、煎蛋网、IT之家、千图网、Pixabay、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、FitGirl、片库、茶杯狐、NO视频、低端影视、奈菲影视、91美剧网、真不卡影院、音范丝、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、极简插件、小众软件、动漫狂、漫画猫、漫画DB、HiComic、动漫之家、古风漫画网、PubMed、wikiHow、GreasyFork、Github、StackOverflow(以上仅一部分,更多的写不下了...

目前为 2021-10-05 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name 自动无缝翻页
  3. // @version 2.6.9
  4. // @author X.I.U
  5. // @description 无缝拼接下一页内容(瀑布流),目前支持:[所有使用「Discuz!、Flarum、DUX(WordPress)」的网站]、百度、谷歌、必应、搜狗、头条搜索、360 搜索、微信搜索、贴吧、豆瓣、微博、NGA、V2EX、龙的天空、起点小说、煎蛋网、IT之家、千图网、Pixabay、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、FitGirl、片库、茶杯狐、NO视频、低端影视、奈菲影视、91美剧网、真不卡影院、音范丝、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、极简插件、小众软件、动漫狂、漫画猫、漫画DB、HiComic、动漫之家、古风漫画网、PubMed、wikiHow、GreasyFork、Github、StackOverflow(以上仅一部分,更多的写不下了...
  6. // @match *://*/*
  7. // @icon https://i.loli.net/2021/03/07/rdijeYm83pznxWq.png
  8. // @grant GM_xmlhttpRequest
  9. // @grant GM_registerMenuCommand
  10. // @grant GM_unregisterMenuCommand
  11. // @grant GM_openInTab
  12. // @grant GM_getValue
  13. // @grant GM_setValue
  14. // @grant GM_notification
  15. // @grant unsafeWindow
  16. // @license GPL-3.0 License
  17. // @run-at document-end
  18. // @namespace https://github.com/XIU2/UserScript
  19. // @supportURL https://github.com/XIU2/UserScript
  20. // @homepageURL https://github.com/XIU2/UserScript
  21. // ==/UserScript==
  22.  
  23. (function() {
  24. 'use strict';
  25. var menuAll = [
  26. ['menu_disable', '✅ 已启用 (点击对当前网站禁用)', '❌ 已禁用 (点击对当前网站启用)', []],
  27. ['menu_discuz_thread_page', '帖子内自动翻页 (仅论坛)', '帖子内自动翻页 (仅论坛)', true],
  28. ['menu_page_number', '显示当前页码及点击暂停翻页', '显示当前页码及点击暂停翻页', true],
  29. ['menu_pause_page', '左键双击网页空白处暂停翻页', '左键双击网页空白处暂停翻页', false]
  30. ], 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'];
  31. for (let i=0;i<menuAll.length;i++){ // 如果读取到的值为 null 就写入默认值
  32. if (GM_getValue(menuAll[i][0]) == null){GM_setValue(menuAll[i][0], menuAll[i][3])};
  33. }
  34. registerMenuCommand();
  35. if (menuId.length < 2) {return}
  36. // 注册脚本菜单
  37. function registerMenuCommand() {
  38. if (menuId.length != []){
  39. for (let i=0;i<menuId.length;i++){
  40. GM_unregisterMenuCommand(menuId[i]);
  41. }
  42. }
  43. for (let i=0;i<menuAll.length;i++) { // 循环注册脚本菜单
  44. menuAll[i][3] = GM_getValue(menuAll[i][0]);
  45. if (menuAll[i][0] === 'menu_disable') { // 启用/禁用
  46.  
  47. if (menu_disable('check')) { // 当前网站在禁用列表中
  48. menuId[i] = GM_registerMenuCommand(`${menuAll[i][2]}`, function(){menu_disable('del')});
  49. return
  50. } else { // // 不在禁用列表中
  51. webType = doesItSupport(); // 判断网站类型(即是否支持),顺便直接赋值
  52. if (webType === 0) {
  53. GM_registerMenuCommand('❌ 当前网站暂不支持 [点击申请支持]', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/419215/feedback', {active: true,insert: true,setParent: true});});
  54. console.info('[自动无缝翻页] - 不支持当前网站 [ ' + location.href + ' ],欢迎申请支持: https://github.com/XIU2/UserScript / https://greasyfork.org/zh-CN/scripts/96880/feedback');
  55. return
  56. } else if (webType === -1) {
  57. return
  58. }
  59. menuId[i] = GM_registerMenuCommand(`${menuAll[i][1]}`, function(){menu_disable('add')});
  60. }
  61.  
  62. } else if (menuAll[i][0] === 'menu_discuz_thread_page') { // 帖子内自动翻页 (仅论坛)
  63.  
  64. if (webType === 2 || forumWebsite.indexOf(location.host) > -1) {
  65. menuId[i] = GM_registerMenuCommand(`${menuAll[i][3]?'✅':'❌'} ${menuAll[i][1]}`, function(){menu_switch(menuAll[i][3], menuAll[i][0], menuAll[i][2])});
  66. }
  67.  
  68. } else {
  69. menuId[i] = GM_registerMenuCommand(`${menuAll[i][3]?'✅':'❌'} ${menuAll[i][1]}`, function(){menu_switch(menuAll[i][3], menuAll[i][0], menuAll[i][2])});
  70. }
  71. }
  72. menuId[menuId.length] = GM_registerMenuCommand('💬 反馈 & 欢迎申请支持', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/419215/feedback', {active: true,insert: true,setParent: true});});
  73. }
  74.  
  75. // 网站规则
  76. function setDBSite() {
  77. /*
  78. 自动翻页规则
  79. locationchange: 对于使用 pjax 技术的网站,需要监听 URL 变化来重新判断翻页规则
  80. type:
  81. 1 = 由脚本实现自动无缝翻页
  82. 2 = 网站自带了自动无缝翻页功能,只需要点击下一页按钮即可
  83. nextText: 按钮文本,当按钮文本 = 该文本时,才会点击按钮加载下一页(避免一瞬间加载太多次下一页)
  84. nextTextOf: 按钮文本的一部分,当按钮文本包含该文本时,才会点击按钮加载下一页(避免一瞬间加载太多次下一页)
  85. nextHTML: 按钮内元素,当按钮内元素 = 该元素内容时,才会点击按钮加载下一页(避免一瞬间加载太多次下一页)
  86. intervals: 点击间隔时间,对于没有按钮文字变化的按钮,可以手动指定间隔时间,单位:ms
  87. 3 = 依靠元素距离可视区域底部的距离来触发翻页
  88. 4 = 部分简单的动态加载类网站(暂时)
  89. insertPosition:
  90. 1 = 插入该元素本身的前面;
  91. 2 = 插入该元素当中,第一个子元素前面;
  92. 3 = 插入该元素当中,最后一个子元素后面;
  93. 4 = 插入该元素本身的后面;
  94. 5 = 插入该元素末尾(针对文本)
  95. mimeType: 网站编码
  96. scriptType: 单独插入 <script> 标签
  97. 1 = 下一页的所有 <script> 标签
  98. 2 = 下一页主体元素同级 <script> 标签
  99. 3 = 下一页主体元素同级 <script> 标签(远程文件)
  100. 4 = 下一页主体元素子元素 <script> 标签
  101. history: 添加历史记录 并 修改当前 URL
  102. forceHTTPS: 下一页链接强制 HTTPS
  103. scrollDelta:数值越大,滚动条触发点越靠上(越早开始翻页),一般是访问网页速度越慢,该值就需要越大(如果 Type = 3,则相反)
  104. function:
  105. before = 插入前执行函数;
  106. after = 插入后执行函数;
  107. parameter = 参数
  108. */
  109. DBSite = {
  110. discuz_forum: {
  111. SiteTypeID: 0,
  112. pager: {
  113. type: 2,
  114. nextLink: '#autopbn',
  115. nextTextOf: '下一页',
  116. scrollDelta: 1500
  117. }
  118. }, // Discuz! - 各版块帖子列表(自带无缝加载下一页按钮的)
  119. discuz_guide: {
  120. SiteTypeID: 0,
  121. pager: {
  122. type: 1,
  123. nextLink: '//a[@class="nxt"][@href][not(contains(@href, "javascript"))] | //a[@class="next"][@href][not(contains(@href, "javascript"))]',
  124. pageElement: 'css;#threadlist table > tbody[id^="normalthread_"]',
  125. insertPosition: ['id("threadlist")//table/tbody[starts-with(@id, "normalthread_")]/parent::table', 3],
  126. replaceE: 'css;.pg, .pages',
  127. scrollDelta: 1000
  128. }
  129. }, // Discuz! - 导读页 及 各版块帖子列表(不带无缝加载下一页按钮的)
  130. discuz_waterfall: {
  131. SiteTypeID: 0,
  132. pager: {
  133. type: 1,
  134. nextLink: '//a[@class="nxt"][@href][not(contains(@href, "javascript"))] | //a[@class="next"][@href][not(contains(@href, "javascript"))]',
  135. pageElement: 'css;#waterfall > li',
  136. insertPosition: ['css;#waterfall', 3],
  137. replaceE: 'css;.pg, .pages',
  138. scrollDelta: 1000
  139. }
  140. }, // Discuz! - 图片模式的各版块帖子列表(不带无缝加载下一页按钮的)
  141. discuz_thread: {
  142. SiteTypeID: 0,
  143. pager: {
  144. type: 1,
  145. nextLink: '//a[@class="nxt"][@href][not(contains(@href, "javascript"))] | //a[@class="next"][@href][not(contains(@href, "javascript"))]',
  146. pageElement: 'css;#postlist > div[id^="post_"]',
  147. insertPosition: ['css;#postlist', 3],
  148. replaceE: 'css;.pg, .pages',
  149. scrollDelta: 1000
  150. },
  151. function: {
  152. before: src_functionBefore,
  153. parameter: [0, 'img[file]', 'file']
  154. }
  155. }, // Discuz! - 帖子内
  156. discuz_search: {
  157. SiteTypeID: 0,
  158. pager: {
  159. type: 1,
  160. nextLink: '//a[@class="nxt"][@href][not(contains(@href, "javascript"))] | //a[@class="next"][@href][not(contains(@href, "javascript"))]',
  161. pageElement: 'css;#threadlist > ul',
  162. insertPosition: ['css;#threadlist', 3],
  163. replaceE: 'css;.pg, .pages',
  164. scrollDelta: 1000
  165. }
  166. }, // Discuz! - 搜索页
  167. discuz_youspace: {
  168. SiteTypeID: 0,
  169. pager: {
  170. type: 1,
  171. nextLink: '//a[@class="nxt"][@href][not(contains(@href, "javascript"))] | //a[@class="next"][@href][not(contains(@href, "javascript"))]',
  172. pageElement: 'css;tbody > tr:not(.th)',
  173. insertPosition: ['css;tbody', 3],
  174. replaceE: 'css;.pg, .pages',
  175. scrollDelta: 1000
  176. }
  177. }, // Discuz! - 回复页、主题页(别人的)
  178. discuz_collection: {
  179. SiteTypeID: 0,
  180. pager: {
  181. type: 1,
  182. nextLink: '//a[@class="nxt"][@href][not(contains(@href, "javascript"))] | //a[@class="next"][@href][not(contains(@href, "javascript"))]',
  183. pageElement: 'css;#ct .bm_c table > tbody',
  184. insertPosition: ['css;#ct .bm_c table', 3],
  185. replaceE: 'css;.pg, .pages',
  186. scrollDelta: 1000
  187. }
  188. }, // Discuz! - 淘帖页
  189. flarum: {
  190. SiteTypeID: 0,
  191. functionStart: function() {locationchange = true;if (location.pathname.indexOf('/d/') === -1) {curSite = DBSite.flarum;}},
  192. pager: {
  193. type: 2,
  194. nextLink: '.DiscussionList-loadMore > button[title]',
  195. intervals: 500,
  196. scrollDelta: 1000
  197. }
  198. }, // Flarum
  199. dux: {
  200. SiteTypeID: 0,
  201. pager: {
  202. type: 1,
  203. nextLink: '//li[@class="next-page"]/a[@href]',
  204. pageElement: 'css;.content > article',
  205. insertPosition: ['css;.content > .pagination', 1],
  206. replaceE: 'css;.content > .pagination',
  207. scrollDelta: 1500
  208. },
  209. function: {
  210. before: src_functionBefore,
  211. parameter: [0, 'img.thumb[data-src]', 'data-src']
  212. }
  213. }, // WordPress 主题
  214. baidu: {
  215. SiteTypeID: 0,
  216. host: 'www.baidu.com',
  217. functionStart: function() {curSite = DBSite.baidu; document.lastElementChild.appendChild(document.createElement('style')).textContent = '.new-pmd .c-img-border {position: initial !important;} .op-bk-polysemy-video__wrap.c-gap-bottom {display: none !important;}';},
  218. pager: {
  219. type: 1,
  220. nextLink: 'id("page")//a[contains(text(),"下一页")][@href]',
  221. pageElement: 'css;#content_left > *',
  222. insertPosition: ['css;#content_left', 3],
  223. replaceE: 'css;#page',
  224. scrollDelta: 1200
  225. }
  226. }, // 百度 搜素
  227. google: {
  228. SiteTypeID: 0,
  229. host: /.google./,
  230. functionStart: function() {if (location.pathname === '/search') {
  231. curSite = DBSite.google;
  232. } else if (location.pathname === '/scholar') {
  233. curSite = DBSite.google_scholar;
  234. }},
  235. pager: {
  236. type: 1,
  237. nextLink: 'id("pnnext")[@href]',
  238. pageElement: 'css;#res > *',
  239. insertPosition: ['css;#res', 3],
  240. replaceE: 'id("navcnt") | id("rcnt")//div[@role="navigation"]',
  241. scriptType: 1,
  242. scrollDelta: 3000
  243. }
  244. }, // 谷歌 搜索
  245. bing: {
  246. SiteTypeID: 0,
  247. host: ['www.bing.com','cn.bing.com'],
  248. functionStart: function() {if (location.pathname === '/search') {
  249. curSite = DBSite.bing; document.lastElementChild.appendChild(document.createElement('style')).textContent = '.b_imagePair.square_mp > .inner {display: none;}';
  250. } else if (location.pathname === '/academic/search') {
  251. curSite = DBSite.bing_academic; document.lastElementChild.appendChild(document.createElement('style')).textContent = 'li.aca_algo_count {display: none !important;}';
  252. }},
  253. pager: {
  254. type: 1,
  255. nextLink: '//a[contains(@class,"sb_pagN")][@href]',
  256. pageElement: 'css;#b_results > li:not(.b_msg):not(.b_pag):not(#mfa_root)',
  257. insertPosition: ['css;#b_results > .b_pag', 1],
  258. replaceE: 'css;#b_results > .b_pag',
  259. scrollDelta: 1500
  260. }
  261. }, // 必应 搜索
  262. sogou: {
  263. SiteTypeID: 0,
  264. host: 'www.sogou.com',
  265. functionStart: function() {if (location.pathname != '/') {curSite = DBSite.sogou;}},
  266. pager: {
  267. type: 1,
  268. nextLink: 'css;#sogou_next',
  269. pageElement: 'css;.results > *',
  270. insertPosition: ['css;.results', 3],
  271. replaceE: 'css;#pagebar_container',
  272. scriptType: 4,
  273. scrollDelta: 1200
  274. }
  275. }, // 搜狗 搜索
  276. sogou_weixin: {
  277. SiteTypeID: 0,
  278. host: 'weixin.sogou.com',
  279. functionStart: function() {if (location.pathname === '/') {
  280. curSite = DBSite.sogou_weixin;
  281. } else if (location.pathname === '/weixin') {
  282. curSite = DBSite.sogou_weixin_search;
  283. }},
  284. pager: {
  285. type: 2,
  286. nextLink: '#look-more',
  287. intervals: 1000,
  288. scrollDelta: 1000
  289. }
  290. }, // 搜狗微信 - 首页
  291. sogou_weixin_search: {
  292. SiteTypeID: 0,
  293. pager: {
  294. type: 1,
  295. nextLink: 'css;#sogou_next',
  296. pageElement: 'css;.news-box > ul[class*="news-list"] > li',
  297. insertPosition: ['css;.news-box > ul[class*="news-list"]', 3],
  298. replaceE: 'css;#pagebar_container',
  299. scrollDelta: 1000
  300. }
  301. }, // 搜狗微信 - 搜索
  302. toutiao: {
  303. SiteTypeID: 0,
  304. host: ['www.toutiao.com', 'so.toutiao.com'],
  305. functionStart: function() {if (location.hostname != 'www.toutiao.com') {if (location.pathname === '/search') {curSite = DBSite.toutiao;}}},
  306. pager: {
  307. type: 1,
  308. nextLink: '//div[contains(@class, "-pagination")]/a[contains(string(), "下一页")]',
  309. pageElement: 'css;div[class*="-result-list"] > .result-content[data-i]',
  310. insertPosition: ['css;div[class*="-result-list"] > .result-content:not([data-i]):last-child', 1],
  311. replaceE: 'css;div[class*="-pagination"]',
  312. scrollDelta: 1200
  313. },
  314. function: {
  315. before: toutiao_functionBefore
  316. }
  317. }, // 头条 搜索
  318. so: {
  319. SiteTypeID: 0,
  320. host: 'www.so.com',
  321. functionStart: function() {if (location.pathname != '/') {curSite = DBSite.so; document.lastElementChild.appendChild(document.createElement('style')).textContent = 'img {opacity: 1 !important;}'}},
  322. pager: {
  323. type: 1,
  324. nextLink: 'css;#snext[href]',
  325. pageElement: 'css;ul.result > li, style:not(src)',
  326. insertPosition: ['css;ul.result', 3],
  327. replaceE: 'css;#page',
  328. scrollDelta: 1200
  329. },
  330. function: {
  331. before: src_functionBefore,
  332. parameter: [0, 'img[data-isrc]', 'data-isrc']
  333. }
  334. }, // 360 搜索
  335. duckduckgo: {
  336. SiteTypeID: 0,
  337. host: 'duckduckgo.com',
  338. functionStart: function() {
  339. if (getCookie('av') != '1') {
  340. document.cookie='av=1; expires=Thu, 18 Dec 2031 12:00:00 GMT; path=/'; // 写入 Cookie 强制开启自带的无缝翻页功能
  341. location.reload(); // 刷新网页
  342. }
  343. },
  344. }, // DuckDuckGo 搜索
  345. startpage: {
  346. SiteTypeID: 0,
  347. host: 'www.startpage.com',
  348. functionStart: function() {if (location.pathname.indexOf('/search') > -1) {curSite = DBSite.startpage;}},
  349. pager: {
  350. type: 1,
  351. nextLink: startpage_functionNext,
  352. pageElement: 'css;section.w-gl--desktop > div',
  353. insertPosition: ['css;section.w-gl--desktop', 3],
  354. replaceE: 'css;.pagination',
  355. scrollDelta: 1500
  356. }
  357. }, // Startpage 搜索
  358. yandex: {
  359. SiteTypeID: 0,
  360. host: 'yandex.com',
  361. functionStart: function() {if (location.pathname === '/search/') {curSite = DBSite.yandex;}},
  362. pager: {
  363. type: 1,
  364. nextLink: 'css;a.pager__item_kind_next',
  365. pageElement: 'css;#search-result > *, style',
  366. insertPosition: ['css;#search-result', 3],
  367. replaceE: 'css;.pager',
  368. scrollDelta: 1500
  369. }
  370. }, // Yandex 搜索
  371. yahoo: {
  372. SiteTypeID: 0,
  373. host: 'search.yahoo.com',
  374. functionStart: function() {if (location.pathname.indexOf('/search') > -1) {curSite = DBSite.yahoo;}},
  375. pager: {
  376. type: 1,
  377. nextLink: 'css;.pagination a.next[href]',
  378. pageElement: 'css;#web ol > li',
  379. insertPosition: ['css;#web ol', 3],
  380. replaceE: 'css;.pagination',
  381. scrollDelta: 1500
  382. }
  383. }, // Yahoo 搜索
  384. yahoo_jp: {
  385. SiteTypeID: 0,
  386. host: 'search.yahoo.co.jp',
  387. functionStart: function() {if (location.pathname.indexOf('/search') > -1) {curSite = DBSite.yahoo_jp;}},
  388. pager: {
  389. type: 1,
  390. nextLink: 'css;.Pagenation__next > a[href]',
  391. pageElement: 'css;.Contents__innerGroupBody > div',
  392. insertPosition: ['css;.Contents__innerGroupBody', 3],
  393. replaceE: 'css;.Pagenation',
  394. scrollDelta: 1500
  395. }
  396. }, // Yahoo 搜索 (JP)
  397. qwant: {
  398. SiteTypeID: 0,
  399. host: 'www.qwant.com',
  400. functionStart: function() {locationchange = true; if (location.search.indexOf('q=') > -1 && location.search.indexOf('t=web') > -1) {curSite = DBSite.qwant;}},
  401. pager: {
  402. type: 2,
  403. nextLink: 'button[data-testid="buttonShowMore"]',
  404. intervals: 500,
  405. scrollDelta: 1500
  406. }
  407. }, // Qwant 搜索
  408. ecosia: {
  409. SiteTypeID: 0,
  410. host: 'www.ecosia.org',
  411. functionStart: function() {if (location.pathname === '/search') {curSite = DBSite.ecosia;}},
  412. pager: {
  413. type: 1,
  414. nextLink: 'css;nav.pagination a[href][aria-label="Next page"]',
  415. pageElement: 'css;section.mainline > div:not(.related-queries)',
  416. insertPosition: ['css;nav.pagination', 1],
  417. replaceE: 'css;nav.pagination',
  418. scrollDelta: 1500
  419. }
  420. }, // Ecosia 搜索
  421. magi: {
  422. SiteTypeID: 0,
  423. host: 'magi.com',
  424. functionStart: function() {if (location.pathname === '/search') {curSite = DBSite.magi;}},
  425. pager: {
  426. type: 2,
  427. nextLink: '.card[data-type="next"]',
  428. nextText: '加载更多',
  429. scrollDelta: 1500
  430. }
  431. }, // Magi 搜索
  432. baidu_tieba: {
  433. SiteTypeID: 0,
  434. host: 'tieba.baidu.com',
  435. functionStart: function() {if (location.pathname === '/f') {
  436. baidu_tieba_1(); // 右侧悬浮发帖按钮点击事件(解决自动翻页导致无法发帖的问题)
  437. curSite = DBSite.baidu_tieba; document.lastElementChild.appendChild(document.createElement('style')).textContent = 'img.j_retract {margin-top: 0 !important;margin-bottom: 0 !important;}'; // 修复帖子列表中预览图片,在切换下一个/上一个图片时,多出来的图片上下边距
  438. //} else if (location.pathname.indexOf('/p/') > -1) {
  439. //curSite = DBSite.baidu_tieba_post;
  440. } else if (location.pathname === '/f/search/res') {
  441. curSite = DBSite.baidu_tieba_search;
  442. }},
  443. pager: {
  444. type: 4,
  445. nextLink: baidu_tieba_functionNext,
  446. pageElement: 'css;#thread_list > li',
  447. insertPosition: ['css;#thread_list', 3],
  448. insertElement: baidu_tieba_insertElement,
  449. replaceE: 'css;#frs_list_pager',
  450. intervals: 3000,
  451. scrollDelta: 2000
  452. },
  453. function: {
  454. before: baidu_tieba_functionBefore
  455. }
  456. }, // 百度贴吧 - 帖子列表
  457. baidu_tieba_post: {
  458. SiteTypeID: 0,
  459. pager: {
  460. type: 1,
  461. nextLink: '//li[contains(@class,"pb_list_pager")]/a[contains(text(),"下一页")][@href]',
  462. pageElement: 'css;#j_p_postlist > div',
  463. insertPosition: ['css;#j_p_postlist', 3],
  464. replaceE: 'css;li.pb_list_pager',
  465. scrollDelta: 1000
  466. }
  467. }, // 百度贴吧 - 帖子内
  468. baidu_tieba_search: {
  469. SiteTypeID: 0,
  470. pager: {
  471. type: 1,
  472. nextLink: '//a[@class="next"][@href]',
  473. pageElement: 'css;#j_p_postlist > *',
  474. insertPosition: ['css;#j_p_postlist', 3],
  475. replaceE: 'css;.pager.pager-search',
  476. scriptType: 1,
  477. scrollDelta: 1000
  478. }
  479. }, // 百度贴吧 - 搜索页
  480. douban_subject_comments: {
  481. SiteTypeID: 0,
  482. host: 'movie.douban.com',
  483. functionStart: function() {if (location.pathname.indexOf('/subject') > -1 && location.pathname.indexOf('/comments') > -1) { // 短评列表
  484. curSite = DBSite.douban_subject_comments;
  485. } else if (location.pathname.indexOf('/subject') > -1 && location.pathname.indexOf('/reviews') > -1) { // 影评列表
  486. curSite = DBSite.douban_subject_reviews;
  487. } else if(location.pathname.indexOf('/subject') > -1 && location.pathname.indexOf('/episode') > -1) { // 电视剧每集评论
  488. curSite = DBSite.douban_subject_episode;
  489. }},
  490. pager: {
  491. type: 1,
  492. nextLink: '//a[@class="next"][@href]',
  493. pageElement: 'css;#comments > .comment-item',
  494. insertPosition: ['css;#paginator', 1],
  495. replaceE: 'css;#paginator',
  496. scrollDelta: 1000
  497. }
  498. }, // 豆瓣 - 短评
  499. douban_subject_reviews: {
  500. SiteTypeID: 0,
  501. pager: {
  502. type: 1,
  503. nextLink: '//link[@rel="next"][@href]',
  504. pageElement: 'css;.review-list > div',
  505. insertPosition: ['css;.review-list', 3],
  506. replaceE: 'css;.paginator',
  507. scrollDelta: 1000
  508. }
  509. }, // 豆瓣 - 影评
  510. douban_subject_episode: {
  511. SiteTypeID: 0,
  512. pager: {
  513. type: 1,
  514. nextLink: '//link[@rel="next"][@href]',
  515. pageElement: 'css;#comments > div',
  516. insertPosition: ['css;#comments', 3],
  517. replaceE: 'css;.paginator',
  518. scrollDelta: 1000
  519. }
  520. }, // 豆瓣 - 剧评
  521. douban_group: {
  522. SiteTypeID: 0,
  523. host: 'www.douban.com',
  524. functionStart: function() {if (location.pathname.indexOf('/group/topic/') > -1) {
  525. curSite = DBSite.douban_group_topic;
  526. } else if (location.pathname.indexOf('/group/explore') > -1) {
  527. curSite = DBSite.douban_group_explore;
  528. } else if (location.pathname.indexOf('/group/') > -1 && location.pathname.indexOf('/discussion') > -1) {
  529. curSite = DBSite.douban_group;
  530. }},
  531. pager: {
  532. type: 1,
  533. nextLink: 'css;span.next > a',
  534. pageElement: 'css;table.olt > tbody > tr:not(.th)',
  535. insertPosition: ['css;table.olt > tbody', 3],
  536. replaceE: 'css;.paginator',
  537. scrollDelta: 1000
  538. }
  539. }, // 豆瓣 - 小组
  540. douban_group_explore: {
  541. SiteTypeID: 0,
  542. pager: {
  543. type: 1,
  544. nextLink: 'css;span.next > a',
  545. pageElement: 'css;#content .article > div > .channel-item',
  546. insertPosition: ['css;#content .article > div', 3],
  547. replaceE: 'css;.paginator',
  548. scrollDelta: 1000
  549. }
  550. }, // 豆瓣 - 小组讨论精选
  551. douban_group_topic: {
  552. SiteTypeID: 0,
  553. pager: {
  554. type: 1,
  555. nextLink: 'css;span.next > a',
  556. pageElement: 'css;#comments > li',
  557. insertPosition: ['css;#comments', 3],
  558. replaceE: 'css;.paginator',
  559. scrollDelta: 1000
  560. }
  561. }, // 豆瓣 - 小组帖子内
  562. weibo_comment: {
  563. SiteTypeID: 0,
  564. host: 'weibo.com',
  565. pager: {
  566. type: 2,
  567. nextLink: 'a[action-type="click_more_comment"]',
  568. nextText: '查看更多c',
  569. scrollDelta: 1000
  570. }
  571. }, // 微博评论
  572. tianya: {
  573. SiteTypeID: 0,
  574. host: 'bbs.tianya.cn',
  575. functionStart: function() {if (location.pathname.indexOf('/list') > -1) {
  576. curSite = DBSite.tianya;
  577. } else if (location.pathname.indexOf('/post') > -1) {
  578. curSite = DBSite.tianya_post;
  579. }},
  580. pager: {
  581. type: 1,
  582. nextLink: '//div[contains(@class, "pages")]/div[@class="links"]/a[contains(text(), "下一页")]',
  583. pageElement: 'css;.tab-bbs-list > tbody:not(:first-of-type)',
  584. insertPosition: ['css;table.tab-bbs-list', 3],
  585. replaceE: '//div[contains(@class, "pages")]',
  586. scrollDelta: 1500
  587. }
  588. }, // 天涯社区
  589. tianya_post: {
  590. SiteTypeID: 0,
  591. pager: {
  592. type: 1,
  593. nextLink: 'a.js-keyboard-next[href]',
  594. pageElement: 'css;.atl-main > div[class="atl-item"]',
  595. insertPosition: ['css;.atl-main', 3],
  596. replaceE: 'css;.atl-pages > form',
  597. scrollDelta: 1500
  598. }
  599. }, // 天涯社区 - 帖子内
  600. nga_thread: {
  601. SiteTypeID: 0,
  602. host: ['bbs.nga.cn', 'ngabbs.com', 'nga.178.com', 'g.nga.cn'],
  603. iframe: true,
  604. functionStart: function() {locationchange = true;
  605. if (location.pathname === '/thread.php') { // 帖子列表
  606. curSite = DBSite.nga_thread;
  607. } else if (location.pathname === '/read.php') { // 帖子内
  608. curSite = DBSite.nga_read;
  609. }},
  610. pager: {
  611. type: 1,
  612. nextLink: 'css;#pagebbtm a[title="下一页"][href]',
  613. pageElement: 'css;#topicrows > tbody, #topicrows > script',
  614. insertPosition: ['css;#topicrows', 3],
  615. replaceE: 'css;div[name="pageball"]',
  616. scriptType: 2,
  617. scrollDelta: 1000
  618. },
  619. function: {
  620. after: nga_thread_functionAfter
  621. }
  622. }, // NGA - 各版块帖子列表
  623. nga_read: {
  624. SiteTypeID: 0,
  625. pager: {
  626. type: 1,
  627. nextLink: 'css;#pagebbtm a[title*="下一页"][href]',
  628. pageElement: 'id("m_posts_c")/table | id("m_posts_c")/script | //script[contains(text(), "commonui.userInfo.setAll")]',
  629. insertPosition: ['css;#m_posts_c', 3],
  630. replaceE: 'css;div[name="pageball"]',
  631. scriptType: 2,
  632. scrollDelta: 1000
  633. }
  634. }, // NGA - 帖子内
  635. v2ex_recent: {
  636. SiteTypeID: 0,
  637. host: ['v2ex.com', 'www.v2ex.com'],
  638. functionStart: function() {if (location.pathname === '/') { // 首页
  639. v2ex_functionAfter('#Main a.topic-link:not([target])');
  640. } else if (location.pathname === '/recent') { // 最近主题页
  641. curSite = DBSite.v2ex_recent;
  642. v2ex_functionAfter('#Main a.topic-link:not([target])');
  643. } else if (location.pathname === '/notifications') { // 提醒消息页
  644. curSite = DBSite.v2ex_notifications;
  645. v2ex_functionAfter('#Main a[href^="/t/"]:not([target])');
  646. } else if (location.pathname === '/balance') { // 账户余额页
  647. curSite = DBSite.v2ex_balance;
  648. } else if (location.pathname.indexOf('/go/') > -1) { // 分类主题页
  649. curSite = DBSite.v2ex_go;
  650. v2ex_functionAfter('#Main a.topic-link:not([target])');
  651. } else if (location.pathname.indexOf('/replies') > -1) { // 用户回复页
  652. curSite = DBSite.v2ex_replies;
  653. v2ex_functionAfter('#Main a[href^="/t/"]:not([target])');
  654. }},
  655. pager: {
  656. type: 1,
  657. nextLink: '//a[@class="page_current"]/following-sibling::a[1][@href]',
  658. pageElement: 'css;.cell.item',
  659. insertPosition: ['//div[@id="Main"]//div[@class="box"]//div[@class="cell"][last()]', 1],
  660. replaceE: 'css;#Main > .box > .cell[style]:not(.item) > table',
  661. scrollDelta: 1500
  662. },
  663. function: {
  664. after: v2ex_functionAfter,
  665. parameter: '#Main a.topic-link:not([target])'
  666. }
  667. }, // V2EX - 最近主题页
  668. v2ex_notifications: {
  669. SiteTypeID: 0,
  670. pager: {
  671. type: 1,
  672. nextLink: '//a[@class="page_current"]/following-sibling::a[1][@href]',
  673. pageElement: 'css;#notifications > div',
  674. insertPosition: ['css;#notifications', 3],
  675. replaceE: 'css;#Main > .box > .cell[style] > table',
  676. scrollDelta: 1500
  677. },
  678. function: {
  679. after: v2ex_functionAfter,
  680. parameter: '#Main a[href^="/t/"]:not([target])'
  681. }
  682. }, // V2EX - 提醒消息页
  683. v2ex_replies: {
  684. SiteTypeID: 0,
  685. pager: {
  686. type: 1,
  687. nextLink: '//a[@class="page_current"]/following-sibling::a[1][@href]',
  688. pageElement: '//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]',
  689. insertPosition: ['//div[@id="Main"]//div[@class="box"]//div[@class="cell"][last()]', 1],
  690. replaceE: 'css;#Main > .box > .cell[style] > table',
  691. scrollDelta: 1500
  692. },
  693. function: {
  694. after: v2ex_functionAfter,
  695. parameter: '#Main a[href^="/t/"]:not([target])'
  696. }
  697. }, // V2EX - 用户回复页
  698. v2ex_go: {
  699. SiteTypeID: 0,
  700. pager: {
  701. type: 1,
  702. nextLink: '//a[@class="page_current"]/following-sibling::a[1][@href]',
  703. pageElement: 'css;#TopicsNode > div',
  704. insertPosition: ['css;#TopicsNode', 3],
  705. replaceE: 'css;#Main > .box > .cell[style] > table',
  706. scrollDelta: 1500
  707. },
  708. function: {
  709. after: v2ex_functionAfter,
  710. parameter: '#Main a.topic-link:not([target])'
  711. }
  712. }, // V2EX - 分类主题页
  713. v2ex_balance: {
  714. SiteTypeID: 0,
  715. pager: {
  716. type: 1,
  717. nextLink: '//a[@class="page_current"]/following-sibling::a[1][@href]',
  718. pageElement: 'css;#Main .box > div:not(.cell) > table > tbody > tr:not(:first-child)',
  719. insertPosition: ['css;#Main .box > div:not(.cell) > table > tbody', 3],
  720. replaceE: 'css;#Main > .box > .cell[style] > table',
  721. scrollDelta: 1000
  722. }
  723. }, // V2EX - 账户余额页
  724. lkong: {
  725. SiteTypeID: 0,
  726. host: 'www.lkong.com',
  727. functionStart: function() {if (location.pathname.indexOf('/forum/') > -1) {
  728. curSite = DBSite.lkong;
  729. } else if (location.pathname.indexOf('/thread/') > -1) {
  730. curSite = DBSite.lkong_thread;
  731. }},
  732. pager: {
  733. type: 1,
  734. nextLink: lkong_functionNext,
  735. pageElement: '//div[@class="main-title"]/parent::div/parent::div | //head/style[@data-emotion-css]',
  736. insertPosition: ['//div[@class="main-title"][1]/parent::div/parent::div/parent::div', 3],
  737. replaceE: 'css;ul.ant-pagination',
  738. intervals: 500,
  739. scrollDelta: 1200
  740. }
  741. }, // 龙的天空 - 各版块帖子列表
  742. lkong_thread: {
  743. SiteTypeID: 0,
  744. pager: {
  745. type: 1,
  746. nextLink: lkong_functionNext,
  747. pageElement: '//div[@class="main-content"]/parent::div | //head/style[@data-emotion-css]',
  748. insertPosition: ['//div[@class="main-content"][1]/parent::div/parent::div', 3],
  749. replaceE: 'css;ul.ant-pagination',
  750. intervals: 500,
  751. scrollDelta: 1200
  752. }
  753. }, // 龙的天空 - 帖子内
  754. pediy_forum: {
  755. SiteTypeID: 0,
  756. host: 'bbs.pediy.com',
  757. functionStart: function() {if (location.pathname.indexOf('/forum-') > -1) {
  758. curSite = DBSite.pediy_forum;
  759. } else if (location.pathname.indexOf('/thread-') > -1) {
  760. if (GM_getValue('menu_discuz_thread_page')) {curSite = DBSite.pediy_thread;}
  761. }},
  762. pager: {
  763. type: 1,
  764. nextLink: '//ul[contains(@class, "pagination")]//a[contains(text(), "▶")]',
  765. pageElement: 'css;table.threadlist > tbody > tr',
  766. insertPosition: ['css;table.threadlist > tbody', 3],
  767. replaceE: 'css;ul.pagination',
  768. scrollDelta: 1500
  769. }
  770. }, // 看雪论坛 - 各版块帖子列表
  771. pediy_thread: {
  772. SiteTypeID: 0,
  773. pager: {
  774. type: 1,
  775. nextLink: '//ul[contains(@class, "pagination")]//a[contains(text(), "▶")]',
  776. pageElement: 'css;table.postlist > tbody > tr[data-pid]',
  777. insertPosition: ['css;table.postlist > tbody > tr:not([data-pid])', 1],
  778. replaceE: 'css;ul.pagination',
  779. scrollDelta: 1500
  780. }
  781. }, // 看雪论坛 - 帖子内
  782. kdslife: {
  783. SiteTypeID: 0,
  784. host: 'club.kdslife.com',
  785. functionStart: function() {
  786. if (location.pathname.indexOf('/f_') > -1) {
  787. curSite = DBSite.kdslife;
  788. } else if (location.pathname.indexOf('/t_') > -1) {
  789. curSite = DBSite.kdslife_t;
  790. }},
  791. pager: {
  792. type: 1,
  793. nextLink: '//div[@class="fr i3_r"]/a[@href][contains(text(), "后一页")]',
  794. pageElement: 'css;ul.main_List > li.i2:not(.h_bg)',
  795. insertPosition: ['css;ul.main_List > li.i3', 1],
  796. replaceE: 'css;ul.main_List > li.i3',
  797. scrollDelta: 1000
  798. }
  799. }, // 宽带山论坛
  800. kdslife_t: {
  801. SiteTypeID: 0,
  802. pager: {
  803. type: 1,
  804. nextLink: '//div[@class="pages"]/a[contains(text(), ">>")]',
  805. pageElement: 'css;#reply_list_panel > *, script[src*="ui/js/kds.js"]',
  806. insertPosition: ['css;#reply_list_panel', 3],
  807. replaceE: 'css;.pages',
  808. scriptType: 3,
  809. scrollDelta: 1000
  810. }
  811. }, // 宽带山论坛 - 帖子内
  812. libaclub: {
  813. SiteTypeID: 0,
  814. host: 'www.libaclub.com',
  815. functionStart: function() {
  816. if (location.pathname === '/' || location.pathname.indexOf('/date_') > -1) {
  817. curSite = DBSite.libaclub;
  818. } else if (location.pathname.indexOf('/f_') > -1) {
  819. curSite = DBSite.libaclub_f;
  820. } else if (location.pathname.indexOf('/t_') > -1 || location.pathname.indexOf('/reply_') > -1) {
  821. curSite = DBSite.libaclub_t;
  822. } else if (location.pathname.indexOf('/prt_') > -1) {
  823. curSite = DBSite.libaclub_prt;
  824. } else if (location.pathname === '/facade.php') {
  825. curSite = DBSite.libaclub_search;
  826. }
  827. document.lastElementChild.appendChild(document.createElement('style')).textContent = 'li.ui-list-merchant-ad, .ui-nav-appImage {display: none !important;}';},
  828. pager: {
  829. type: 1,
  830. nextLink: '//div[@class="ui-crumbs-more"]/a[@class="fn-link"][1]',
  831. pageElement: 'css;ul.ui-list > li:not(.ui-list-item-head):not(.ui-list-merchant-ad)',
  832. insertPosition: ['css;ul.ui-list', 3],
  833. replaceE: 'css;div.ui-crumbs-more',
  834. scrollDelta: 1200
  835. }
  836. }, // 篱笆网论坛
  837. libaclub_f: {
  838. SiteTypeID: 0,
  839. pager: {
  840. type: 1,
  841. nextLink: '//div[@class="ui-paging"]/a[@class="ui-paging-next"]',
  842. pageElement: 'css;ul.ui-list > li:not(.ui-list-item-head):not(.ui-list-merchant-ad)',
  843. insertPosition: ['css;ul.ui-list', 3],
  844. replaceE: 'css;div.ui-paging',
  845. scrollDelta: 1200
  846. }
  847. }, // 篱笆网论坛 - 各版块帖子列表
  848. libaclub_t: {
  849. SiteTypeID: 0,
  850. pager: {
  851. type: 1,
  852. nextLink: 'css;a.ui-paging-next',
  853. pageElement: 'css;.ui-box-content > div.ui-topic, .ui-box-content > a[name]',
  854. insertPosition: ['css;.ui-box-content', 3],
  855. replaceE: 'css;div.ui-paging',
  856. scrollDelta: 1500
  857. }
  858. }, // 篱笆网论坛 - 帖子内
  859. libaclub_prt: {
  860. SiteTypeID: 0,
  861. pager: {
  862. type: 1,
  863. nextLink: 'css;a.ui-paging-next',
  864. pageElement: 'css;ul.ui-list > li',
  865. insertPosition: ['css;ul.ui-list', 3],
  866. replaceE: 'css;div.ui-paging',
  867. scrollDelta: 2000
  868. }
  869. }, // 篱笆网论坛 - 帖子内 - 打印版
  870. libaclub_search: {
  871. SiteTypeID: 0,
  872. pager: {
  873. type: 1,
  874. nextLink: '//div[@class="ui-page"]/a[contains(text(), "下一页")]',
  875. pageElement: 'css;.ui-box-main > ul.ui-list > li',
  876. insertPosition: ['css;.ui-box-main > ul.ui-list', 3],
  877. replaceE: 'css;div.ui-page',
  878. scrollDelta: 1200
  879. }
  880. }, // 篱笆网论坛 - 搜索页
  881. lieyou: {
  882. SiteTypeID: 0,
  883. host: 'bbs.lieyou888.com',
  884. functionStart: function() {if (location.pathname.indexOf('/forum') > -1) {curSite = DBSite.lieyou;}},
  885. pager: {
  886. type: 1,
  887. nextLink: '//div[contains(@class, "_pageNav")]/a[@href][contains(text(), "下一页")]',
  888. pageElement: 'css;ul.gb-bbs-list > li',
  889. insertPosition: ['css;ul.gb-bbs-list', 3],
  890. replaceE: 'css;._pageNav',
  891. scrollDelta: 1000
  892. },
  893. function: {
  894. before: src_functionBefore,
  895. parameter: [0, 'img[original]', 'original']
  896. }
  897. }, // 芥子空间论坛
  898. xcar_forumdisplay: {
  899. SiteTypeID: 0,
  900. host: 'www.xcar.com.cn',
  901. functionStart: function() {if (location.pathname === '/bbs/forumdisplay.php') {curSite = DBSite.xcar_forumdisplay}},
  902. pager: {
  903. type: 1,
  904. nextLink: 'css;a.page_down',
  905. pageElement: 'css;.table-section > dl:not(.table_head)',
  906. insertPosition: ['css;.table-section', 3],
  907. replaceE: 'css;.forumList_page',
  908. scrollDelta: 2000
  909. }
  910. }, // 爱卡汽车网论坛 - 各版块帖子列表
  911. flyert_forumdisplay: {
  912. SiteTypeID: 0,
  913. host: 'www.flyert.com',
  914. functionStart: function() {if (location.search.indexOf('mod=forumdisplay') > -1) {
  915. curSite = DBSite.flyert_forumdisplay;
  916. } else if (location.search.indexOf('mod=viewthread') > -1) {
  917. if (GM_getValue('menu_discuz_thread_page')) {curSite = DBSite.flyert_viewthread;}
  918. }},
  919. pager: {
  920. type: 1,
  921. nextLink: '//a[@class="nxt"][@href][not(contains(@href, "javascript"))]',
  922. pageElement: 'css;#threadlist table > tbody[id^="normalthread_"]',
  923. insertPosition: ['id("threadlist")//table/tbody[starts-with(@id, "normalthread_")]/parent::table', 3],
  924. replaceE: 'css;.pg',
  925. scrollDelta: 2500
  926. }
  927. }, // 飞客网论坛 - 各版块帖子列表
  928. flyert_viewthread: {
  929. SiteTypeID: 0,
  930. pager: {
  931. type: 1,
  932. nextLink: '//a[@class="nxt"][@href][not(contains(@href, "javascript"))]',
  933. pageElement: 'css;#postlist > .comiis_viewbox',
  934. insertPosition: ['css;#postlist', 3],
  935. replaceE: 'css;.comiis_pgs > .pg',
  936. scrollDelta: 3000
  937. }
  938. }, // 飞客网论坛 - 帖子内
  939. adnmb3: {
  940. SiteTypeID: 0,
  941. host: 'adnmb3.com',
  942. functionStart: function() {
  943. if (location.pathname.indexOf('/m/f/') > -1) {
  944. curSite = DBSite.adnmb3_mf;
  945. } else if (location.pathname.indexOf('/m/t/') > -1) {
  946. curSite = DBSite.adnmb3_mt;
  947. } else if (location.pathname.indexOf('/f/') > -1 || location.pathname.indexOf('/Forum/') > -1) {
  948. curSite = DBSite.adnmb3;
  949. } else if (location.pathname.indexOf('/t/') > -1) {
  950. curSite = DBSite.adnmb3_t;
  951. }},
  952. pager: {
  953. type: 1,
  954. nextLink: '//ul[contains(@class, "pagination")]//a[contains(text(), "下一页")]',
  955. pageElement: 'css;.h-threads-list > *, script[src$="/h.desktop.js"]',
  956. insertPosition: ['css;.h-threads-list', 3],
  957. replaceE: '//ul[contains(@class, "pagination")]',
  958. scriptType: 3,
  959. scrollDelta: 1500
  960. }
  961. }, // A 岛
  962. adnmb3_t: {
  963. SiteTypeID: 0,
  964. pager: {
  965. type: 1,
  966. nextLink: '//ul[contains(@class, "pagination")]//a[contains(text(), "下一页")]',
  967. pageElement: 'css;.h-threads-list > .h-threads-item > .h-threads-item-replys, script[src$="/h.desktop.js"]',
  968. insertPosition: ['css;.h-threads-list > .h-threads-item', 3],
  969. replaceE: '//ul[contains(@class, "pagination")]',
  970. scriptType: 3,
  971. scrollDelta: 1500
  972. }
  973. }, // A 岛 - 帖子内
  974. adnmb3_mf: {
  975. SiteTypeID: 0,
  976. pager: {
  977. type: 1,
  978. nextLink: '//li[contains(@class, "pagination-next")]//a[contains(text(), "下一页")]',
  979. pageElement: 'css;.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"]',
  980. insertPosition: ['css;#h-threads-pagination', 1],
  981. replaceE: 'css;#h-threads-pagination',
  982. scriptType: 3,
  983. scrollDelta: 1500
  984. }
  985. }, // A 岛 - 帖子列表(手机版)
  986. adnmb3_mt: {
  987. SiteTypeID: 0,
  988. pager: {
  989. type: 1,
  990. nextLink: '//li[contains(@class, "pagination-next")]//a[contains(text(), "下一页")]',
  991. pageElement: 'css;.h-threads-replylist > div, script[src$="/h.mobile.js"]',
  992. insertPosition: ['css;.h-threads-replylist', 3],
  993. replaceE: 'css;#h-threads-pagination',
  994. scriptType: 3,
  995. scrollDelta: 1500
  996. }
  997. }, // A 岛 - 帖子内(手机版)
  998. jandan: {
  999. SiteTypeID: 0,
  1000. host: 'jandan.net',
  1001. functionStart: function() {if (location.pathname === '/' || location.pathname.indexOf('/page/') > -1) {
  1002. curSite = DBSite.jandan;
  1003. } else if (location.pathname === '/dzh') {
  1004. curSite = DBSite.jandan_dzh;
  1005. } else {
  1006. curSite = DBSite.jandan_comment;
  1007. }},
  1008. pager: {
  1009. type: 1,
  1010. nextLink: '//div[@class="wp-pagenavi"]/a[contains(text(), "下一页") or contains(text(), "更多文章")]',
  1011. pageElement: 'css;#content > .list-post',
  1012. insertPosition: ['css;.wp-pagenavi', 1],
  1013. replaceE: 'css;.wp-pagenavi, #nav_prev',
  1014. scrollDelta: 1500
  1015. },
  1016. function: {
  1017. before: src_functionBefore,
  1018. parameter: [0, 'img[data-original]', 'data-original']
  1019. }
  1020. }, // 煎蛋网
  1021. jandan_comment: {
  1022. SiteTypeID: 0,
  1023. pager: {
  1024. type: 1,
  1025. nextLink: 'css;a.previous-comment-page',
  1026. pageElement: 'css;ol.commentlist > li[id^="comment-"], script[src^="//cdn.jandan.net/static/min/"]',
  1027. insertPosition: ['css;ol.commentlist', 3],
  1028. replaceE: 'css;.cp-pagenavi, #nav_prev',
  1029. scriptType: 3,
  1030. scrollDelta: 1500
  1031. }
  1032. }, // 煎蛋网
  1033. jandan_dzh: {
  1034. SiteTypeID: 0,
  1035. pager: {
  1036. type: 2,
  1037. nextLink: '.show_more',
  1038. intervals: 1500,
  1039. scrollDelta: 1500
  1040. }
  1041. }, // 煎蛋网 - 大杂烩
  1042. guokr: {
  1043. SiteTypeID: 0,
  1044. host: 'www.guokr.com',
  1045. pager: {
  1046. type: 2,
  1047. nextLink: 'div[class*="LoadMoreWrap"]',
  1048. intervals: 1500,
  1049. scrollDelta: 1500
  1050. }
  1051. }, // 果壳网
  1052. expreview: {
  1053. SiteTypeID: 0,
  1054. host: 'www.expreview.com',
  1055. pager: {
  1056. type: 2,
  1057. nextLink: '#show_article_red_1SHOW',
  1058. intervals: 1500,
  1059. scrollDelta: 1500
  1060. }
  1061. }, // 超能网
  1062. landian: {
  1063. SiteTypeID: 0,
  1064. host: 'www.landian.vip',
  1065. pager: {
  1066. type: 2,
  1067. nextLink: '.load-more > button',
  1068. nextText: '加载更多',
  1069. scrollDelta: 1300
  1070. }
  1071. }, // 蓝点网
  1072. ithome: {
  1073. SiteTypeID: 0,
  1074. host: 'www.ithome.com',
  1075. pager: {
  1076. type: 2,
  1077. nextLink: 'a.more',
  1078. intervals: 1500,
  1079. scrollDelta: 1500
  1080. }
  1081. }, // IT 之家
  1082. _58pic: {
  1083. SiteTypeID: 0,
  1084. host: 'www.58pic.com',
  1085. functionStart: function() {document.lastElementChild.appendChild(document.createElement('style')).textContent = '.qt-model-t, .qtw-card.place-box.is-one, .search-v3-row .search-v3-back {display: none !important;}'; // 隐藏登录弹窗等
  1086. if (location.pathname.indexOf('/tupian/') > -1) {
  1087. curSite = DBSite._58pic; document.lastElementChild.appendChild(document.createElement('style')).textContent = '.qtw-card.place-box.is-two {display: none !important;}'; // 隐藏末尾很大的 [下一页] 按钮
  1088. } else if (location.pathname.indexOf('/c/') > -1) {
  1089. curSite = DBSite._58pic_c;
  1090. }},
  1091. pager: {
  1092. type: 1,
  1093. nextLink: '//div[contains(@class,"page-box")]//a[text()="下一页"][@href]',
  1094. pageElement: 'css;.pic-box > .qtw-card',
  1095. insertPosition: ['css;.pic-box', 3],
  1096. replaceE: 'css;.page-box',
  1097. scrollDelta: 2500
  1098. },
  1099. function: {
  1100. before: src_functionBefore,
  1101. parameter: [0, 'img[data-original]', 'data-original']
  1102. }
  1103. }, // 千图网 - 分类/搜索页
  1104. _58pic_c: {
  1105. SiteTypeID: 0,
  1106. pager: {
  1107. type: 1,
  1108. nextLink: '//div[contains(@class,"page-box")]//a[text()="下一页"][@href]',
  1109. pageElement: 'css;.list-box > .qtw-card',
  1110. insertPosition: ['css;.list-box', 3],
  1111. replaceE: 'css;.page-box',
  1112. scrollDelta: 4000
  1113. },
  1114. function: {
  1115. before: src_functionBefore,
  1116. parameter: [0, 'img[data-original]', 'data-original']
  1117. }
  1118. }, // 千图网 - 专题/收藏夹
  1119. pixabay: {
  1120. SiteTypeID: 0,
  1121. host: 'pixabay.com',
  1122. pager: {
  1123. type: 1,
  1124. nextLink: '//a[text()="›"][@href]',
  1125. pageElement: 'css;[class^="results"] > [class^="container"] > div',
  1126. insertPosition: ['css;[class^="results"] > [class^="container"]', 3],
  1127. replaceE: '//a[text()="›"][@href]',
  1128. scrollDelta: 2000
  1129. },
  1130. function: {
  1131. before: src_functionBefore,
  1132. parameter: [0, 'img[data-lazy-src]', 'data-lazy-src']
  1133. }
  1134. }, // Pixabay
  1135. logosc: {
  1136. SiteTypeID: 0,
  1137. host: 'www.logosc.cn',
  1138. functionStart: function() {if (location.pathname.indexOf('/so/') > -1) {curSite = DBSite.logosc;}},
  1139. pager: {
  1140. type: 2,
  1141. nextLink: 'button.so-pablo-button',
  1142. intervals: 1500,
  1143. scrollDelta: 1500
  1144. }
  1145. }, // 搜图神器 (免费无版权)
  1146. puxiang: {
  1147. SiteTypeID: 0,
  1148. host: 'www.puxiang.com',
  1149. functionStart: function() {if (location.pathname === '/search/favorite') {
  1150. curSite = DBSite.puxiang_collect;
  1151. } else if (location.pathname === '/search/puxiang' || location.pathname === '/list' || location.pathname === '/galleries' || location.pathname === '/articles') {
  1152. curSite = DBSite.puxiang;
  1153. } else if (location.pathname === '/') {
  1154. curSite = DBSite.puxiang; curSite.pager.scrollDelta = 4000;
  1155. }},
  1156. pager: {
  1157. type: 1,
  1158. nextLink: 'css;li.next > a[href]',
  1159. pageElement: 'css;.work-list > div',
  1160. insertPosition: ['css;.work-list', 3],
  1161. replaceE: 'css;.pagerbar',
  1162. scrollDelta: 1500
  1163. }
  1164. }, // 普象网 - 作品集/搜索页
  1165. puxiang_collect: {
  1166. SiteTypeID: 0,
  1167. pager: {
  1168. type: 1,
  1169. nextLink: 'css;li.next > a[href]',
  1170. pageElement: 'css;.collect-list > div',
  1171. insertPosition: ['css;.collect-list', 3],
  1172. replaceE: 'css;.pagerbar',
  1173. scrollDelta: 1500
  1174. }
  1175. }, // 普象网 - 收藏夹
  1176. om: {
  1177. SiteTypeID: 0,
  1178. host: 'www.om.cn',
  1179. functionStart: function() {if (location.pathname != '/') {curSite = DBSite.om;}},
  1180. pager: {
  1181. type: 1,
  1182. nextLink: 'css;li.next > a[href]',
  1183. pageElement: 'css;.main_content > ul > li',
  1184. insertPosition: ['css;.main_content > ul', 3],
  1185. replaceE: 'css;ul.pagination',
  1186. scrollDelta: 1500
  1187. }
  1188. }, // 欧模网
  1189. _3dmgame: {
  1190. SiteTypeID: 0,
  1191. host: 'www.3dmgame.com',
  1192. pager: {
  1193. type: 3,
  1194. nextLink: '//li[@class="next"]/a[@href]',
  1195. pageElement: 'css;.news_warp_center > *',
  1196. insertPosition: ['css;.news_warp_center', 3],
  1197. replaceE: 'css;.pagewrap',
  1198. scrollElement: '.pagewrap',
  1199. scrollDelta: 400
  1200. }
  1201. }, // 3DM
  1202. _3dmgame_mod: {
  1203. SiteTypeID: 0,
  1204. host: 'mod.3dmgame.com',
  1205. pager: {
  1206. type: 1,
  1207. nextLink: _3dmgame_mod_functionNext,
  1208. pageElement: '//div[contains(@class, "game-mod-list") or contains(@class, "search-mod-list")] | //script[not(@src or @type)][contains(text(), ".game-mod-page") or contains(text(), ".search-mod-page")]',
  1209. insertPosition: ['//div[contains(@class, "game-mod-wrap") or contains(@class, "search-mod ")]', 3],
  1210. scriptType: 2,
  1211. history: true,
  1212. scrollDelta: 1200
  1213. }
  1214. }, // 3DM MOD站
  1215. ali213_www: {
  1216. SiteTypeID: 0,
  1217. host: 'www.ali213.net',
  1218. pager: {
  1219. type: 3,
  1220. nextLink: 'id("after_this_page")[@href]',
  1221. pageElement: 'css;#Content >*:not(.news_ding):not(.page_fenye)',
  1222. insertPosition: ['css;.page_fenye', 1],
  1223. replaceE: 'css;.page_fenye',
  1224. scrollElement: '.page_fenye',
  1225. scrollDelta: 400
  1226. }
  1227. }, // 游侠网
  1228. ali213_gl: {
  1229. SiteTypeID: 0,
  1230. host: 'gl.ali213.net',
  1231. functionStart: function() {curSite = DBSite.ali213_gl; document.lastElementChild.appendChild(document.createElement('style')).textContent = '.n_show_b {display: none !important;}';},
  1232. pager: {
  1233. type: 3,
  1234. nextLink: '//a[@class="next n"][@href]',
  1235. pageElement: 'css;.c-detail >*',
  1236. insertPosition: ['css;.c-detail', 3],
  1237. replaceE: 'css;.page_fenye',
  1238. scrollElement: '.page_fenye',
  1239. scrollDelta: 400
  1240. }
  1241. }, // 游侠网 - 攻略
  1242. ali213_pic: {
  1243. SiteTypeID: 0,
  1244. host: 'pic.ali213.net',
  1245. functionStart: function() {curSite = DBSite.ali213_pic; document.lastElementChild.appendChild(document.createElement('style')).textContent = 'a.prev, a.next {display: none !important;}';},
  1246. pager: {
  1247. type: 1,
  1248. nextLink: 'css;a.next[href]',
  1249. pageElement: 'css;#image-show > img',
  1250. insertPosition: ['css;#image-show', 3],
  1251. replaceE: 'css;#image-show > a',
  1252. scrollDelta: 1200
  1253. }
  1254. }, // 游侠网 - 图库
  1255. gamersky_ent: {
  1256. SiteTypeID: 0,
  1257. host: 'www.gamersky.com',
  1258. functionStart: function() {if (location.pathname.indexOf('/ent/') > -1) {curSite = DBSite.gamersky_ent;} else {curSite = DBSite.gamersky_gl;}},
  1259. pager: {
  1260. type: 3,
  1261. nextLink: '//div[@class="page_css"]/a[text()="下一页"][@href]',
  1262. pageElement: 'css;.Mid2L_con > *:not(.gs_nc_editor):not(.pagecss):not(.page_css):not(.gs_ccs_solve):not(.post_ding)',
  1263. insertPosition: ['css;.page_css', 1],
  1264. replaceE: 'css;.page_css',
  1265. scrollElement: '.page_css',
  1266. scrollDelta: 100
  1267. }
  1268. }, // 游民星空
  1269. gamersky_gl: {
  1270. SiteTypeID: 0,
  1271. pager: {
  1272. type: 3,
  1273. nextLink: '//div[@class="page_css"]/a[text()="下一页"][@href]',
  1274. forceHTTPS: true,
  1275. pageElement: 'css;.Mid2L_con > *:not(.gs_nc_editor):not(.pagecss):not(.gs_ccs_solve):not(.post_ding)',
  1276. insertPosition: ['css;.gs_nc_editor', 1],
  1277. replaceE: 'css;.page_css',
  1278. scrollElement: '.pagecss',
  1279. scrollDelta: -1000
  1280. },
  1281. function: {
  1282. before: gamersky_gl_functionBefore
  1283. }
  1284. }, // 游民星空 - 攻略
  1285. nexusmods: {
  1286. SiteTypeID: 0,
  1287. host: 'www.nexusmods.com',
  1288. pager: {
  1289. type: 4,
  1290. nextLink: nexusmods_functionNext,
  1291. pageElement: 'css;ul.tiles > li',
  1292. insertPosition: ['css;ul.tiles', 3],
  1293. insertElement: nexusmods_insertElement,
  1294. replaceE: 'css;.pagination',
  1295. scrollDelta: 3000
  1296. }
  1297. }, // NexusMods
  1298. steamcommunity: {
  1299. SiteTypeID: 0,
  1300. host: 'steamcommunity.com',
  1301. pager: {
  1302. type: 1,
  1303. nextLink: '//a[@class="pagebtn"][last()][@href]',
  1304. pageElement: 'css;.workshopBrowseItems > *',
  1305. insertPosition: ['css;.workshopBrowseItems', 3],
  1306. replaceE: 'css;.workshopBrowsePaging',
  1307. scriptType: 2,
  1308. scrollDelta: 1500
  1309. }
  1310. }, // 创意工坊 - 项目列表
  1311. yikm: {
  1312. SiteTypeID: 0,
  1313. host: 'www.yikm.net',
  1314. pager: {
  1315. type: 1,
  1316. nextLink: '//ul[@class="pager"]//a[text()="下一页"]',
  1317. pageElement: '//h2[contains(text(), "所有游戏") or contains(text(), "搜索结果")]/following-sibling::div[1]/div',
  1318. insertPosition: ['//h2[contains(text(), "所有游戏") or contains(text(), "搜索结果")]/following-sibling::div[1]', 3],
  1319. replaceE: 'css;ul.pager',
  1320. scrollDelta: 1500
  1321. }
  1322. }, // 小霸王其乐无穷
  1323. cs_rin_ru: {
  1324. SiteTypeID: 0,
  1325. host: 'cs.rin.ru',
  1326. functionStart: function() {if (location.pathname === '/forum/viewforum.php') { // 版块帖子列表
  1327. curSite = DBSite.cs_rin_ru;
  1328. } else if (location.pathname === '/forum/viewtopic.php') { // 帖子内
  1329. if (GM_getValue('menu_discuz_thread_page')) curSite = DBSite.cs_rin_ru_viewtopic;
  1330. } else if (location.pathname === '/forum/search.php') { // 搜索结果
  1331. curSite = DBSite.cs_rin_ru_search;
  1332. }},
  1333. pager: {
  1334. type: 1,
  1335. nextLink: '//td[@class="gensmall"][@align="right"]//a[text()="Next"][@href]',
  1336. pageElement: 'css;#pagecontent > table.tablebg > tbody > tr:not([align])',
  1337. insertPosition: ['css;#pagecontent > table.tablebg > tbody > tr[align]', 1],
  1338. replaceE: 'css;#pagecontent > table:first-child',
  1339. scrollDelta: 1500
  1340. },
  1341. function: {
  1342. before: cs_rin_ru_functionBefore
  1343. }
  1344. }, // cs.rin.ru - 各版块帖子列表
  1345. cs_rin_ru_viewtopic: {
  1346. SiteTypeID: 0,
  1347. pager: {
  1348. type: 1,
  1349. nextLink: 'id("pageheader")/p[@class="gensmall"]//a[text()="Next"][@href]',
  1350. pageElement: 'css;#pagecontent > table.tablebg:not(:nth-last-child(2)):not(:nth-child(2))',
  1351. insertPosition: ['css;#pagecontent > table.tablebg:nth-last-child(2)', 1],
  1352. replaceE: 'css;#pagecontent >table:not(.tablebg), #pageheader p.gensmall',
  1353. scrollDelta: 1500
  1354. }
  1355. }, // cs.rin.ru - 帖子内
  1356. cs_rin_ru_search: {
  1357. SiteTypeID: 0,
  1358. pager: {
  1359. type: 1,
  1360. nextLink: 'id("wrapcentre")/div[@class="nav"]//a[text()="Next"]',
  1361. pageElement: 'css;#wrapcentre > form > table.tablebg > tbody > tr[valign]',
  1362. insertPosition: ['css;#wrapcentre > form > table.tablebg > tbody > tr:last-child', 1],
  1363. replaceE: 'css;#wrapcentre > div',
  1364. scrollDelta: 1500
  1365. }
  1366. }, // cs.rin.ru - 搜索页
  1367. crackhub: {
  1368. SiteTypeID: 0,
  1369. host: 'crackhub.site',
  1370. functionStart: function() {curSite = DBSite.crackhub; document.lastElementChild.appendChild(document.createElement('style')).textContent = 'html.wp-dark-mode-active .inside-article {background-color: var(--wp-dark-mode-bg);}';},
  1371. pager: {
  1372. type: 1,
  1373. nextLink: '//a[@class="next page-numbers"][@href]',
  1374. pageElement: 'css;article[id^="post-"]',
  1375. insertPosition: ['css;nav.paging-navigation', 1],
  1376. replaceE: 'css;nav.paging-navigation',
  1377. scrollDelta: 2000
  1378. }
  1379. }, // Crackhub213
  1380. fitgirl: {
  1381. SiteTypeID: 0,
  1382. host: 'fitgirl-repacks.site',
  1383. pager: {
  1384. type: 1,
  1385. nextLink: '//a[@class="next page-numbers"][@href]',
  1386. pageElement: 'css;article[id^="post-"]',
  1387. insertPosition: ['css;nav.paging-navigation', 1],
  1388. replaceE: 'css;nav.paging-navigation',
  1389. scrollDelta: 2000
  1390. }
  1391. }, // FitGirl Repacks
  1392. pianku: {
  1393. SiteTypeID: 0,
  1394. host: /pianku/,
  1395. functionStart: function() {if (location.pathname != '/') {curSite = DBSite.pianku;}},
  1396. pager: {
  1397. type: 1,
  1398. nextLink: 'css;a.a1[href]',
  1399. pageElement: 'css;.content-list > li',
  1400. insertPosition: ['css;.content-list', 3],
  1401. replaceE: 'css;.pages',
  1402. scrollDelta: 1500
  1403. },
  1404. function: {
  1405. before: src_functionBefore,
  1406. parameter: [0, 'img[data-src]', 'data-src']
  1407. }
  1408. }, // 片库
  1409. cupfox: {
  1410. SiteTypeID: 0,
  1411. host: 'www.cupfox.com',
  1412. pager: {
  1413. type: 2,
  1414. nextLink: '.load-more',
  1415. nextText: '点击加载更多',
  1416. scrollDelta: 700
  1417. }
  1418. }, // 茶杯狐
  1419. novipnoad: {
  1420. SiteTypeID: 0,
  1421. host: 'www.novipnoad.com',
  1422. functionStart: function() {if (location.pathname != '/' && location.pathname.indexOf('.html') === -1) {curSite = DBSite.novipnoad;}},
  1423. pager: {
  1424. type: 1,
  1425. nextLink: 'css;a.nextpostslink',
  1426. pageElement: 'css;.video-listing-content .row > div',
  1427. insertPosition: ['css;.video-listing-content .row', 3],
  1428. replaceE: 'css;.wp-pagenavi',
  1429. scrollDelta: 1500
  1430. },
  1431. function: {
  1432. before: src_functionBefore,
  1433. parameter: [0, 'img[data-original]', 'data-original']
  1434. }
  1435. }, // NO视频
  1436. ddrk: {
  1437. SiteTypeID: 0,
  1438. host: 'ddrk.me',
  1439. functionStart: function() {if (location.pathname === '/' || location.pathname.indexOf('/category/') > -1 || location.pathname.indexOf('/tag/') > -1) {curSite = DBSite.ddrk;}},
  1440. pager: {
  1441. type: 1,
  1442. nextLink: 'css;a.next',
  1443. pageElement: 'css;.post-box-list > article',
  1444. insertPosition: ['css;.post-box-list', 3],
  1445. replaceE: 'css;.pagination_wrap',
  1446. scrollDelta: 1500
  1447. }
  1448. }, // 低端影视
  1449. nfmovies: {
  1450. SiteTypeID: 0,
  1451. host: 'www.nfmovies.com',
  1452. functionStart: function() {if (location.pathname === '/search.php' || location.pathname.indexOf('/list/') > -1) {curSite = DBSite.nfmovies;}},
  1453. pager: {
  1454. type: 1,
  1455. nextLink: '//ul[contains(@class, "myui-page")]/li/a[contains(text(), "下一页")]',
  1456. pageElement: 'css;ul.myui-vodlist > li',
  1457. insertPosition: ['css;ul.myui-vodlist', 3],
  1458. replaceE: 'css;ul.myui-page',
  1459. scrollDelta: 1500
  1460. },
  1461. function: {
  1462. before: src_functionBefore,
  1463. parameter: [1, 'a[data-original]', 'data-original']
  1464. }
  1465. }, // 奈菲影视
  1466. zxzj: {
  1467. SiteTypeID: 0,
  1468. host: 'www.zxzj.me',
  1469. functionStart: function() {if (location.pathname != '/' && location.pathname.indexOf('/detail/') === -1) {
  1470. curSite = DBSite.zxzj; document.lastElementChild.appendChild(document.createElement('style')).textContent = 'div.stui-page__all {display: none !important;}';
  1471. }},
  1472. pager: {
  1473. type: 1,
  1474. nextLink: '//ul[contains(@class, "stui-page__item")]//a[contains(text(), "下一页")]',
  1475. pageElement: 'css;ul.stui-vodlist > li',
  1476. insertPosition: ['css;ul.stui-vodlist', 3],
  1477. replaceE: 'css;ul.stui-page__item',
  1478. scrollDelta: 1000
  1479. },
  1480. function: {
  1481. before: src_functionBefore,
  1482. parameter: [1, 'a[data-original]', 'data-original']
  1483. }
  1484. }, // 在线之家
  1485. _91mjw: {
  1486. SiteTypeID: 0,
  1487. host: '91mjw.com',
  1488. functionStart: function() {if (location.pathname.indexOf('/video/') === -1 || location.pathname.indexOf('/vplay/') === -1) {curSite = DBSite._91mjw;}},
  1489. pager: {
  1490. type: 1,
  1491. nextLink: 'css;.next-page > a',
  1492. pageElement: 'css;.m-movies > article',
  1493. insertPosition: ['css;.pagination', 1],
  1494. replaceE: 'css;.pagination',
  1495. scrollDelta: 1500
  1496. },
  1497. function: {
  1498. before: src_functionBefore,
  1499. parameter: [0, 'img[data-original]', 'data-original']
  1500. }
  1501. }, // 91 美剧网
  1502. zhenbuka: {
  1503. SiteTypeID: 0,
  1504. host: ['www.zhenbuka3.com', 'www.zhenbuka5.com'],
  1505. functionStart: function() {if (location.pathname.indexOf('/vodtype/') > -1) {curSite = DBSite.zhenbuka;}},
  1506. pager: {
  1507. type: 1,
  1508. nextLink: '//ul[contains(@class, "stui-page")]/li/a[contains(text(), "下一页")]',
  1509. pageElement: 'css;ul.stui-vodlist > li',
  1510. insertPosition: ['css;ul.stui-vodlist', 3],
  1511. replaceE: 'css;ul.stui-page',
  1512. scrollDelta: 1500
  1513. },
  1514. function: {
  1515. before: src_functionBefore,
  1516. parameter: [1, 'a[data-original]', 'data-original']
  1517. }
  1518. }, // 真不卡影院
  1519. dm233: {
  1520. SiteTypeID: 0,
  1521. host: 'www.dm233.cc',
  1522. functionStart: function() {if (location.pathname.indexOf('/catalog/') > -1 || location.pathname === '/recommend/' || location.pathname === '/search') {
  1523. curSite = DBSite.dm233;
  1524. } else if (location.pathname === '/article/') {
  1525. curSite = DBSite.dm233_article;
  1526. } else if (location.pathname === '/rank/') {
  1527. curSite = DBSite.dm233_rank;
  1528. }},
  1529. pager: {
  1530. type: 1,
  1531. nextLink: '//div[@class="pagelist"]//a[contains(text(), "下一页") or contains(text(), "下一頁")]',
  1532. pageElement: 'css;.dhnew ul > li',
  1533. insertPosition: ['css;.dhnew ul', 3],
  1534. replaceE: 'css;.pagelist',
  1535. scrollDelta: 1000
  1536. }
  1537. }, // 233 动漫
  1538. dm233_article: {
  1539. SiteTypeID: 0,
  1540. pager: {
  1541. type: 1,
  1542. nextLink: '//div[@class="pagelist"]//a[contains(text(), "下一页") or contains(text(), "下一頁")]',
  1543. pageElement: 'css;.xgyd ul > li',
  1544. insertPosition: ['css;.xgyd ul', 3],
  1545. replaceE: 'css;.pagelist',
  1546. scrollDelta: 1000
  1547. }
  1548. }, // 233 动漫 - 动漫情报/资讯
  1549. dm233_rank: {
  1550. SiteTypeID: 0,
  1551. pager: {
  1552. type: 1,
  1553. nextLink: '//div[@class="pagelist"]//a[contains(text(), "下一页") or contains(text(), "下一頁")]',
  1554. pageElement: 'css;.side-update.normal-wai > .normal-nei',
  1555. insertPosition: ['css;.side-update.normal-wai', 3],
  1556. replaceE: 'css;.pagelist',
  1557. scrollDelta: 1000
  1558. }
  1559. }, // 233 动漫 - 排行榜
  1560. agefans: {
  1561. SiteTypeID: 0,
  1562. host: 'www.agefans.cc',
  1563. functionStart: function() {if (location.pathname.indexOf('/catalog/') > -1 || location.pathname === '/search') {
  1564. curSite = DBSite.agefans;
  1565. } else if (location.pathname === '/recommend' || location.pathname === '/update') {
  1566. curSite = DBSite.agefans_;
  1567. } else if (location.pathname === '/rank') {
  1568. curSite = DBSite.agefans_rank;
  1569. }},
  1570. pager: {
  1571. type: 1,
  1572. nextLink: 'id("container")//div[@class="blockcontent"]/div[@style][not(@class)]/li/a[@href][contains(text(), "下一页")]',
  1573. pageElement: 'css;#container .blockcontent1 > div',
  1574. insertPosition: ['css;#container .blockcontent1', 3],
  1575. replaceE: 'css;#container .blockcontent > div[style]:not([class])',
  1576. scrollDelta: 1000
  1577. }
  1578. }, // AGE 动漫 - 全部/搜索
  1579. agefans_: {
  1580. SiteTypeID: 0,
  1581. pager: {
  1582. type: 1,
  1583. nextLink: 'id("container")//div[@class="blockcontent"]/div[@style][not(@class)]/li/a[@href][contains(text(), "下一页")]',
  1584. pageElement: 'css;#container .blockcontent > ul > li',
  1585. insertPosition: ['css;#container .blockcontent > ul', 3],
  1586. replaceE: 'css;#container .blockcontent > div[style]:not([class])',
  1587. scrollDelta: 1000
  1588. }
  1589. }, // AGE 动漫 - 其他页
  1590. agefans_rank: {
  1591. SiteTypeID: 0,
  1592. pager: {
  1593. type: 1,
  1594. nextLink: 'id("container")/ul[@style][not(@class)]/li/a[@href][contains(text(), "下一页")]',
  1595. pageElement: 'css;#container > .div_right .blockcontent.div_right_r_3 > ul',
  1596. insertPosition: ['css;#container > .div_right .blockcontent.div_right_r_3', 3],
  1597. replaceE: 'css;#container > ul[style]:not([class])',
  1598. scrollDelta: 1000
  1599. }
  1600. }, // AGE 动漫 - 排行榜
  1601. yhdm: {
  1602. SiteTypeID: 0,
  1603. host: 'www.imomoe.la',
  1604. functionStart: function() {if (location.pathname.indexOf('/list/') > -1) {
  1605. curSite = DBSite.yhdm;
  1606. } else if (location.pathname === '/so.asp' || location.pathname === '/search.asp') {
  1607. curSite = DBSite.yhdm_;
  1608. }},
  1609. pager: {
  1610. type: 1,
  1611. nextLink: '//div[@class="pages"]/a[@href][contains(text(), "下一页")]',
  1612. pageElement: 'css;#contrainer > .img> ul > li',
  1613. insertPosition: ['css;#contrainer > .img> ul', 3],
  1614. replaceE: 'css;.pages',
  1615. mimeType: 'text/html; charset=gb2312',
  1616. scrollDelta: 1000
  1617. }
  1618. }, // 樱花动漫
  1619. yhdm_: {
  1620. SiteTypeID: 0,
  1621. pager: {
  1622. type: 1,
  1623. nextLink: '//div[@class="pages"]/a[@href][contains(text(), "下一页")]',
  1624. pageElement: 'css;#contrainer .fire .pics > ul > li',
  1625. insertPosition: ['css;#contrainer .fire .pics > ul', 3],
  1626. replaceE: 'css;.pages',
  1627. mimeType: 'text/html; charset=gb2312',
  1628. scrollDelta: 1000
  1629. }
  1630. }, // 樱花动漫 - 搜索页等
  1631. zzzfun: {
  1632. SiteTypeID: 0,
  1633. host: 'www.zzzfun.com',
  1634. functionStart: function() {
  1635. if (location.pathname.indexOf('/vod_type') > -1 || location.pathname.indexOf('/vod_show') > -1) {
  1636. curSite = DBSite.zzzfun;
  1637. } else if (location.pathname.indexOf('/vod_search') > -1) {
  1638. curSite = DBSite.zzzfun_search;
  1639. }},
  1640. pager: {
  1641. type: 1,
  1642. nextLink: 'css;#page a[title="下一页"]',
  1643. pageElement: 'css;ul.search-result > a',
  1644. insertPosition: ['css;ul.search-result', 3],
  1645. replaceE: 'css;#page',
  1646. scrollDelta: 1000
  1647. },
  1648. function: {
  1649. before: src_functionBefore,
  1650. parameter: [0, 'img[data-original]', 'data-original']
  1651. }
  1652. }, // ZzzFun 动漫
  1653. zzzfun_search: {
  1654. SiteTypeID: 0,
  1655. pager: {
  1656. type: 1,
  1657. nextLink: 'css;#page a[title="下一页"]',
  1658. pageElement: 'css;ul.show-list > li',
  1659. insertPosition: ['css;ul.show-list', 3],
  1660. replaceE: 'css;#page',
  1661. scrollDelta: 1000
  1662. },
  1663. function: {
  1664. before: src_functionBefore,
  1665. parameter: [0, 'img[data-original]', 'data-original']
  1666. }
  1667. }, // ZzzFun 动漫 - 搜索页
  1668. yinfans: {
  1669. SiteTypeID: 0,
  1670. host: 'www.yinfans.net',
  1671. functionStart: function() {curSite = DBSite.yinfans; document.lastElementChild.appendChild(document.createElement('style')).textContent = '#post_container {height: auto !important;} #post_container > li {position: static !important; float: left !important; height: 620px !important;}';},
  1672. pager: {
  1673. type: 1,
  1674. nextLink: 'css;a.next[href]',
  1675. pageElement: 'css;#post_container > li',
  1676. insertPosition: ['css;#post_container', 3],
  1677. replaceE: 'css;.pagination',
  1678. scrollDelta: 1500
  1679. }
  1680. }, // 音范丝
  1681. btbtt: {
  1682. SiteTypeID: 0,
  1683. host: /btbtt/,
  1684. pager: {
  1685. type: 1,
  1686. nextLink: '//div[@class="page"]/a[contains(text(), "▶") or contains(text(), "下一页")]',
  1687. pageElement: 'css;#threadlist > table, #threadlist > hr',
  1688. insertPosition: ['css;#threadlist', 3],
  1689. replaceE: 'css;.page',
  1690. scrollDelta: 2000
  1691. }
  1692. }, // BT 之家
  1693. bdys: {
  1694. SiteTypeID: 0,
  1695. host: 'www.bd2020.com',
  1696. functionStart: function() {if (location.pathname != '/' && !(/\/\d+\.htm/.test(location.pathname))) {curSite = DBSite.bdys;}},
  1697. pager: {
  1698. type: 2,
  1699. nextLink: 'div.layui-flow-more > a',
  1700. nextText: '加载更多',
  1701. scrollDelta: 1000
  1702. }
  1703. }, // BD 影视
  1704. gaoqing_fm: {
  1705. SiteTypeID: 0,
  1706. host: 'gaoqing.fm',
  1707. pager: {
  1708. type: 2,
  1709. nextLink: '.col-md-12 > a[href], #loadmore > a[href]',
  1710. intervals: 1500,
  1711. scrollDelta: 1000
  1712. }
  1713. }, // 高清电台
  1714. yyds: {
  1715. SiteTypeID: 0,
  1716. host: 'yyds.fans',
  1717. functionStart: function() {
  1718. if (location.search != '' && location.search.indexOf('p=') === -1) {
  1719. curSite = DBSite.yyds;
  1720. }},
  1721. pager: {
  1722. type: 1,
  1723. nextLink: 'css;a.next.page-numbers[href]',
  1724. pageElement: 'css;.list-grouped > div',
  1725. insertPosition: ['css;.list-grouped', 3],
  1726. replaceE: 'css;nav.pagination',
  1727. scrollDelta: 1100
  1728. }
  1729. }, // YYDS 电影
  1730. kisssub: {
  1731. SiteTypeID: 0,
  1732. host: 'www.kisssub.org',
  1733. pager: {
  1734. type: 1,
  1735. nextLink: 'css;a.nextprev',
  1736. pageElement: 'css;#data_list > tr',
  1737. insertPosition: ['css;#data_list', 3],
  1738. replaceE: 'css;.pages',
  1739. scrollDelta: 2500
  1740. }
  1741. }, // 爱恋动漫
  1742. dmhy: {
  1743. SiteTypeID: 0,
  1744. host: ['share.dmhy.org', 'dmhy.anoneko.com'],
  1745. pager: {
  1746. type: 1,
  1747. nextLink: '//div[@class="nav_title"]/a[@href][contains(text(), "下一頁")]',
  1748. pageElement: 'css;#topic_list > tbody > tr',
  1749. insertPosition: ['css;#topic_list > tbody', 3],
  1750. replaceE: 'css;.nav_title',
  1751. scrollDelta: 1500
  1752. },
  1753. function: {
  1754. after: function() {document.body.appendChild(document.createElement('script')).textContent = `$('#topic_list > tbody > tr:even:not(.even):not(.odd)').addClass('even'); $('#topic_list > tbody > tr:odd:not(.even):not(.odd)').addClass('odd');`;}
  1755. }
  1756. }, // 动漫花园
  1757. futaacg: {
  1758. SiteTypeID: 0,
  1759. host: 'futaacg.com',
  1760. pager: {
  1761. type: 1,
  1762. nextLink: 'css;ul.pagination a[rel="next"]',
  1763. pageElement: 'css;.topic-list > div',
  1764. insertPosition: ['css;.topic-list', 3],
  1765. replaceE: 'css;ul.pagination',
  1766. scrollDelta: 1500
  1767. }
  1768. }, // 扶她动漫
  1769. bangumi: {
  1770. SiteTypeID: 0,
  1771. host: 'bangumi.moe',
  1772. pager: {
  1773. type: 2,
  1774. nextLink: '[torrent-list="lattorrents"] button[ng-click="loadMore()"] ,[torrent-list="torrents"] button[ng-click="loadMore()"]',
  1775. intervals: 1000,
  1776. scrollDelta: 1500
  1777. }
  1778. }, // 萌番组
  1779. miobt: {
  1780. SiteTypeID: 0,
  1781. host: ['miobt.com', 'www.36dm.club'],
  1782. functionStart: function() {curSite = DBSite.miobt;
  1783. if (location.host === 'www.36dm.club') {
  1784. curSite.pager.scrollDelta = 1000;
  1785. }},
  1786. pager: {
  1787. type: 1,
  1788. nextLink: 'css;a.nextprev[href]',
  1789. pageElement: 'css;#data_list > tr',
  1790. insertPosition: ['css;#data_list', 3],
  1791. replaceE: 'css;.pages',
  1792. scrollDelta: 2000
  1793. }
  1794. }, // MioBT + 简单动漫
  1795. nyaa: {
  1796. SiteTypeID: 0,
  1797. host: /nyaa\.si/,
  1798. pager: {
  1799. type: 1,
  1800. nextLink: '//a[@rel="next"][@href] | //li[@class="next"]/a[@href]',
  1801. pageElement: 'css;table.torrent-list > tbody > tr',
  1802. insertPosition: ['css;table.torrent-list > tbody', 3],
  1803. replaceE: 'css;ul.pagination',
  1804. scrollDelta: 2000
  1805. }
  1806. }, // Nyaa
  1807. skrbt: {
  1808. SiteTypeID: 0,
  1809. host: /skrbt/,
  1810. functionStart: function() {if (location.pathname === '/search') curSite = DBSite.skrbt;},
  1811. pager: {
  1812. type: 1,
  1813. nextLink: skrbt_functionNext,
  1814. pageElement: 'css;div[class="row"] > .col-md-6 > ul',
  1815. insertPosition: ['css;nav[aria-label*="Page"]', 1],
  1816. replaceE: 'css;ul.pagination',
  1817. scrollDelta: 900
  1818. }
  1819. }, // SkrBT
  1820. rarbgprx: {
  1821. SiteTypeID: 0,
  1822. host: /rarbg/,
  1823. functionStart: function() {if (location.pathname === '/torrents.php') {curSite = DBSite.rarbgprx;}},
  1824. pager: {
  1825. type: 1,
  1826. nextLink: '(//a[@title="next page"])[1][@href]',
  1827. pageElement: 'css;table.lista2t tr.lista2',
  1828. insertPosition: ['css;table.lista2t > tbody', 3],
  1829. replaceE: 'css;#pager_links',
  1830. scrollDelta: 1000
  1831. }
  1832. }, // RARBG
  1833. subdh: {
  1834. SiteTypeID: 0,
  1835. host: 'subdh.com',
  1836. functionStart: function() {if (location.pathname === '/' || location.pathname.indexOf('/list/new') > -1) {
  1837. curSite = DBSite.subdh;
  1838. } else if (location.pathname.indexOf('/search') > -1) {
  1839. curSite = DBSite.subdh_search;
  1840. }},
  1841. pager: {
  1842. type: 1,
  1843. nextLink: '//a[@class="page-link"][contains(text(), "下一页")]',
  1844. pageElement: 'css;.col-lg-9 .bg-white.shadow-sm.rounded-3 > .row.gx-0',
  1845. insertPosition: ['css;.col-lg-9 .bg-white.shadow-sm.rounded-3', 3],
  1846. replaceE: 'css;ul.pagination',
  1847. scrollDelta: 1000
  1848. }
  1849. }, // SubDH
  1850. subdh_search: {
  1851. SiteTypeID: 0,
  1852. pager: {
  1853. type: 1,
  1854. nextLink: '//a[@class="page-link"][contains(text(), "下一页")]',
  1855. pageElement: 'css;.col-lg-9 .bg-white.shadow-sm.rounded-3',
  1856. insertPosition: ['css;nav[aria-label="pagination"]', 1],
  1857. replaceE: 'css;ul.pagination',
  1858. scrollDelta: 1000
  1859. }
  1860. }, // SubDH - 搜索页
  1861. mini4k: {
  1862. SiteTypeID: 0,
  1863. host: 'www.mini4k.com',
  1864. functionStart: function() {if (location.pathname != '/' && !(/\/\d{3,}/.test(location.pathname))) {curSite = DBSite.mini4k;};},
  1865. pager: {
  1866. type: 1,
  1867. nextLink: 'css;a.pager__item--next[href]',
  1868. pageElement: 'css;div[class*="-item-list"] > ul > li',
  1869. insertPosition: ['css;div[class*="-item-list"] > ul', 3],
  1870. replaceE: 'css;.pagination',
  1871. scrollDelta: 2000
  1872. }
  1873. }, // MINI4K
  1874. bthaha: {
  1875. SiteTypeID: 0,
  1876. host: /bthaha/,
  1877. functionStart: function() {if (location.pathname.indexOf('/search/') > -1) {
  1878. curSite = DBSite.bthaha;
  1879. document.lastElementChild.appendChild(document.createElement('style')).textContent = '[id^="list_top"], [id^="list_bottom"] {display: none !important;}';
  1880. document.querySelectorAll('[id^="list_top"], [id^="list_bottom"]').forEach(function (one) {one.parentElement.parentElement.hidden = true;});
  1881. }},
  1882. pager: {
  1883. type: 1,
  1884. nextLink: '//ul[@class="pagination"]/li/a[contains(text(), "下一页")]',
  1885. pageElement: 'css;table.table > tbody > tr',
  1886. insertPosition: ['css;table.table > tbody', 3],
  1887. replaceE: 'css;ul.pagination',
  1888. scrollDelta: 1000
  1889. },
  1890. function: {
  1891. before: bthaha_functionBefore
  1892. }
  1893. }, // BTHaha
  1894. a4k: {
  1895. SiteTypeID: 0,
  1896. host: 'www.a4k.net',
  1897. functionStart: function() {if (location.pathname.indexOf('/subtitle/') === -1) {curSite = DBSite.a4k;};},
  1898. pager: {
  1899. type: 1,
  1900. nextLink: 'css;a.pager__item--next[href]',
  1901. pageElement: 'css;ul.list > li',
  1902. insertPosition: ['css;ul.list', 3],
  1903. replaceE: 'css;.pagination',
  1904. scrollDelta: 1000
  1905. }
  1906. }, // A4k 字幕网(字幕)
  1907. assrt: {
  1908. SiteTypeID: 0,
  1909. host: 'assrt.net',
  1910. functionStart: function() {if (location.pathname != '/') {curSite = DBSite.assrt;};},
  1911. pager: {
  1912. type: 1,
  1913. nextLink: assrt_functionNext,
  1914. pageElement: 'css;.resultcard > div:not(#top-banner):not(#bottom-banner)',
  1915. insertPosition: ['css;.pagelinkcard', 1],
  1916. replaceE: 'css;.pagelinkcard',
  1917. scrollDelta: 1000
  1918. }
  1919. }, // 射手网(字幕)
  1920. subhd: {
  1921. SiteTypeID: 0,
  1922. host: 'subhd.tv',
  1923. functionStart: function() {if (location.pathname === '/forum/forum') {
  1924. curSite = DBSite.subhd_forum;
  1925. } else if (location.pathname != '/' && location.pathname != '/zu' && location.pathname.indexOf('/a/') === -1 && location.pathname.indexOf('/d/') === -1 && location.pathname.indexOf('/forum/') === -1) {
  1926. curSite = DBSite.subhd;
  1927. }},
  1928. pager: {
  1929. type: 1,
  1930. nextLink: '//a[@class="page-link"][contains(text(), "下一页")]',
  1931. pageElement: 'css;.bg-white.shadow-sm.rounded-3',
  1932. insertPosition: ['css;nav.clearfix', 1],
  1933. replaceE: 'css;nav.clearfix',
  1934. scrollDelta: 1000
  1935. }
  1936. }, // SubHD(字幕)
  1937. subhd_forum: {
  1938. SiteTypeID: 0,
  1939. pager: {
  1940. type: 1,
  1941. nextLink: '//a[@class="page-link"][contains(text(), "下一页")]',
  1942. pageElement: 'css;.bg-white.shadow-sm.rounded-3 > div',
  1943. insertPosition: ['css;.bg-white.shadow-sm.rounded-3', 3],
  1944. replaceE: 'css;nav.clearfix',
  1945. scrollDelta: 800
  1946. }
  1947. }, // SubHD - forum(字幕)
  1948. qidian: {
  1949. SiteTypeID: 0,
  1950. host: 'www.qidian.com',
  1951. functionStart: function() {if (location.pathname.indexOf('/all/') > -1) {curSite = DBSite.qidian;}},
  1952. pager: {
  1953. type: 1,
  1954. nextLink: 'css;a[class*="pagination-next"][href]',
  1955. pageElement: 'css;ul.all-img-list > li',
  1956. insertPosition: ['css;ul.all-img-list', 3],
  1957. replaceE: 'css;#page-container',
  1958. scrollDelta: 900
  1959. }
  1960. }, // 起点小说
  1961. qidian_read: {
  1962. SiteTypeID: 0,
  1963. host: 'read.qidian.com',
  1964. functionStart: function() {if (location.pathname.indexOf('/chapter/') > -1) {curSite = DBSite.qidian_read; document.lastElementChild.appendChild(document.createElement('style')).textContent = '.admire-wrap {display: none !important;}';}},
  1965. pager: {
  1966. type: 1,
  1967. nextLink: 'css;a[id$="chapterNext"][href]',
  1968. pageElement: 'css;.main-text-wrap > div:not(.admire-wrap)',
  1969. insertPosition: ['css;.main-text-wrap', 3],
  1970. replaceE: 'css;.chapter-control, title',
  1971. history: true,
  1972. scrollDelta: 900
  1973. }
  1974. }, // 起点小说 - 阅读页
  1975. baoshuu: {
  1976. SiteTypeID: 0,
  1977. host: 'www.baoshuu.com',
  1978. functionStart: function() {if (location.pathname.indexOf('/TXT/list') > -1) curSite = DBSite.baoshuu;},
  1979. pager: {
  1980. type: 1,
  1981. nextLink: '//div[@class="listl2"]//a[@href][text()="下一页"]',
  1982. pageElement: 'css;.listl2 > ul > li',
  1983. insertPosition: ['css;.listl2 > ul', 3],
  1984. replaceE: 'css;listl2 > dl',
  1985. mimeType: 'text/html; charset=gb2312',
  1986. scrollDelta: 900
  1987. }
  1988. }, // 宝书网
  1989. baoshuu_m: {
  1990. SiteTypeID: 0,
  1991. host: 'm.baoshuu.com',
  1992. functionStart: function() {if (location.pathname.indexOf('/TXT/list') > -1) curSite = DBSite.baoshuu_m;},
  1993. pager: {
  1994. type: 1,
  1995. nextLink: '//div[@class="man_first"]//a[@href][text()="下一页"]',
  1996. pageElement: 'css;.man_first > ul > li',
  1997. insertPosition: ['css;.man_first > ul', 3],
  1998. replaceE: 'css;.man_first > dl',
  1999. mimeType: 'text/html; charset=gb2312',
  2000. scrollDelta: 900
  2001. }
  2002. }, // 宝书网- 手机版
  2003. _23wx: {
  2004. SiteTypeID: 0,
  2005. host: 'www.23wx.cc',
  2006. functionStart: function() {if (/\d+\/\d+\.html/.test(location.pathname)) {curSite = DBSite._23wx;}},
  2007. pager: {
  2008. type: 1,
  2009. nextLink: '//div[@class="bottem2"]/a[contains(text(), "下一章")]',
  2010. pageElement: 'css;#content',
  2011. insertPosition: ['css;#content', 5],
  2012. replaceE: 'css;.bottem2, head > title, .bookname > h1',
  2013. mimeType: 'text/html; charset=gbk',
  2014. history: true,
  2015. scrollDelta: 1500
  2016. }
  2017. }, // 顶点小说
  2018. xineyby: {
  2019. SiteTypeID: 0,
  2020. host: 'www.xineyby.com',
  2021. functionStart: function() {if (location.pathname.indexOf('/read/') > -1) {
  2022. curSite = DBSite.xineyby;
  2023. } else if (location.pathname.indexOf('/list/') > -1 || location.pathname.indexOf('/quanben/') > -1 || location.pathname.indexOf('/search') > -1) {
  2024. curSite = DBSite.xineyby_list;
  2025. }},
  2026. pager: {
  2027. type: 1,
  2028. nextLink: 'id("footlink")/a[contains(text(), "下一页")]',
  2029. pageElement: 'css;#contents',
  2030. insertPosition: ['css;#contents', 5],
  2031. replaceE: 'css;#footlink, head > title, #amain dd h1',
  2032. mimeType: 'text/html; charset=gbk',
  2033. history: true,
  2034. scrollDelta: 900
  2035. }
  2036. }, // 无错小说网
  2037. xineyby_list: {
  2038. SiteTypeID: 0,
  2039. pager: {
  2040. type: 1,
  2041. nextLink: 'css;#pagelink a.next[href]',
  2042. pageElement: 'css;#content > dd tbody > tr:not(:first-child)',
  2043. insertPosition: ['css;#content > dd tbody', 3],
  2044. replaceE: 'css;#pagelink',
  2045. mimeType: 'text/html; charset=gbk',
  2046. scrollDelta: 900
  2047. }
  2048. }, // 无错小说网 - 分类/搜索页
  2049. linovel: {
  2050. SiteTypeID: 0,
  2051. host: 'www.linovel.net',
  2052. functionStart: function() {if (/\/book\/\d+\/.+\.html/.test(location.pathname)) {
  2053. document.lastElementChild.appendChild(document.createElement('style')).textContent = '.reward-section {display: none !important;}';
  2054. } else if (location.pathname.indexOf('/cat/') > -1) {
  2055. curSite = DBSite.linovel;
  2056. }},
  2057. pager: {
  2058. type: 1,
  2059. nextLink: '//ul[@class="pagination"]/li/a[contains(text(), "下一页")]',
  2060. pageElement: 'css;.rank-book-list > div',
  2061. insertPosition: ['css;.rank-book-list', 3],
  2062. replaceE: 'css;ul.pagination',
  2063. scrollDelta: 1000
  2064. }
  2065. }, // 轻之文库
  2066. linovelib: {
  2067. SiteTypeID: 0,
  2068. host: 'www.linovelib.com',
  2069. functionStart: function() {if (/\/novel\/\d+\/.+\.html/.test(location.pathname)) {
  2070. curSite = DBSite.linovelib;
  2071. } else if (location.pathname.indexOf('/wenku/') > -1) {
  2072. curSite = DBSite.linovelib_wenku;
  2073. } else if (location.pathname.indexOf('/top/') > -1 || location.pathname.indexOf('/topfull/') > -1 || location.pathname.indexOf('toplist.php') > -1) {
  2074. curSite = DBSite.linovelib_top;
  2075. }},
  2076. pager: {
  2077. type: 1,
  2078. nextLink: '//p[@class="mlfy_page"]/a[@href][contains(text(), "下一页") or contains(text(), "下一章")]',
  2079. pageElement: 'css;#mlfy_main_text > *',
  2080. insertPosition: ['css;#mlfy_main_text', 3],
  2081. replaceE: 'css;p.mlfy_page, head > title',
  2082. history: true,
  2083. scrollDelta: 1000
  2084. }
  2085. }, // 哔哩轻小说
  2086. linovelib_wenku: {
  2087. SiteTypeID: 0,
  2088. pager: {
  2089. type: 1,
  2090. nextLink: 'css;#pagelink > a.next[href]',
  2091. pageElement: 'css;.store_collist > div.bookbox',
  2092. insertPosition: ['css;.store_collist', 3],
  2093. replaceE: 'css;#pagelink',
  2094. scrollDelta: 1000
  2095. },
  2096. function: {
  2097. before: src_functionBefore,
  2098. parameter: [0, 'img[data-original]', 'data-original']
  2099. }
  2100. }, // 哔哩轻小说 - 文库
  2101. linovelib_top: {
  2102. SiteTypeID: 0,
  2103. pager: {
  2104. type: 1,
  2105. nextLink: 'css;#pagelink > a.next[href]',
  2106. pageElement: 'css;.rankpage_box > div.rank_d_list',
  2107. insertPosition: ['css;div.pages', 1],
  2108. replaceE: 'css;#pagelink',
  2109. scrollDelta: 1000
  2110. },
  2111. function: {
  2112. before: src_functionBefore,
  2113. parameter: [0, 'img[data-original]', 'data-original']
  2114. }
  2115. }, // 哔哩轻小说 - 全本
  2116. cartoonmad: {
  2117. SiteTypeID: 0,
  2118. host: ['www.cartoonmad.com','www.cartoonmad.cc'],
  2119. functionStart: function() {if (location.pathname.indexOf('/comic/') > -1) {
  2120. document.lastElementChild.appendChild(document.createElement('style')).textContent = 'body > table > tbody > tr:nth-child(4) > td > table > tbody > tr:first-child > td:not(:first-child) {display: none !important;} body > table > tbody > tr:nth-child(4) > td > table > tbody > tr:first-child > td:first-child img {max-width: 100%;height: auto;display: block !important;margin: 0 auto !important;}';
  2121. document.querySelector('body > table > tbody > tr:nth-child(4) > td > table > tbody > tr:first-child > td:first-child > a').href = 'javascript:void(0);'; // 清理图片上的链接
  2122. curSite = DBSite.cartoonmad;
  2123. } else if (location.pathname != '/') {
  2124. curSite = DBSite.cartoonmad_list;
  2125. }},
  2126. pager: {
  2127. type: 1,
  2128. nextLink: cartoonmad_functionNext,
  2129. pageElement: 'css;body > table > tbody > tr:nth-child(4) > td > table > tbody > tr:first-child > td:first-child img',
  2130. insertPosition: ['css;body > table > tbody > tr:nth-child(4) > td > table > tbody > tr:first-child > td:first-child > a', 3],
  2131. replaceE: 'css;body > table > tbody > tr:nth-child(2), body > table > tbody > tr:nth-child(5)',
  2132. mimeType: 'text/html; charset=big5',
  2133. scrollDelta: 2000
  2134. }
  2135. }, // 动漫狂
  2136. cartoonmad_list: {
  2137. SiteTypeID: 0,
  2138. pager: {
  2139. type: 1,
  2140. nextLink: '//a[@class="pages"][contains(text(), "下一頁")]',
  2141. pageElement: 'css;td[background="/image/content_box4.gif"]+td > table > tbody > tr',
  2142. insertPosition: ['css;td[background="/image/content_box4.gif"]+td > table > tbody', 3],
  2143. replaceE: '//a[@class="pages"]/parent::td/parent::tr | //font[contains(text(), "目前在第")]',
  2144. mimeType: 'text/html; charset=big5',
  2145. scrollDelta: 1000
  2146. }
  2147. }, // 动漫狂 - 分类/搜索页
  2148. manhuacat: {
  2149. SiteTypeID: 0,
  2150. host: 'www.manhuacat.com',
  2151. functionStart: function() {if (/\/manga\/\d+\/.+\.html/.test(location.pathname)) {
  2152. if (getCookie('is_pull') == 'true') { // 强制关闭 [下拉] 模式
  2153. document.cookie='is_pull=false; expires=Thu, 18 Dec 2031 12:00:00 GMT; path=/'; // 写入 Cookie 关闭 [下拉] 模式
  2154. location.reload(); // 刷新网页
  2155. }
  2156. setTimeout(manhuacat_init, 100);
  2157. curSite = DBSite.manhuacat; document.lastElementChild.appendChild(document.createElement('style')).textContent = '#left, #right, #pull-load, .loading, .pagination, footer {display: none !important;} .img-content > img {display: block !important;margin: 0 auto !important; border: none !important; padding: 0 !important; max-width: 99% !important; height: auto !important;}'; // 隐藏不需要的元素,调整图片
  2158. } else if (location.pathname.indexOf('/list') > -1) {
  2159. curSite = DBSite.manhuacat_list;
  2160. } else if (location.pathname.indexOf('/search') > -1 || location.pathname.indexOf('/update') > -1) {
  2161. curSite = DBSite.manhuacat_search;
  2162. }},
  2163. pager: {
  2164. type: 4,
  2165. nextLink: manhuacat_functionNext,
  2166. insertPosition: ['css;.img-content', 3],
  2167. insertElement: manhuacat_insertElement,
  2168. replaceE: 'css;.comic-detail > .breadcrumb-bar, .comic-detail >h2.h4, title, .vg-r-data, body > script:not([src])',
  2169. intervals: 2000,
  2170. scrollDelta: 3000
  2171. }
  2172. }, // 漫画猫
  2173. manhuacat_list: {
  2174. SiteTypeID: 0,
  2175. pager: {
  2176. type: 1,
  2177. nextLink: '//div[contains(@class, "pagination")]//a[@href][contains(text(), "下一页") or contains(text(), "下页")]',
  2178. pageElement: 'css;.comic-main-section > *',
  2179. insertPosition: ['css;.comic-main-section', 3],
  2180. replaceE: 'css;.pagination',
  2181. scrollDelta: 1000
  2182. },
  2183. function: {
  2184. before: src_functionBefore,
  2185. parameter: [0, 'img[data-original]', 'data-original']
  2186. }
  2187. }, // 漫画猫 - 分类页
  2188. manhuacat_search: {
  2189. SiteTypeID: 0,
  2190. pager: {
  2191. type: 1,
  2192. nextLink: '//div[contains(@class, "pagination")]//a[@href][contains(text(), "下一页") or contains(text(), "下页")]',
  2193. pageElement: 'css;.comic-main-section .row > div',
  2194. insertPosition: ['css;.comic-main-section .row', 3],
  2195. replaceE: 'css;.pagination',
  2196. scrollDelta: 1000
  2197. }
  2198. }, // 漫画猫 - 搜索页
  2199. manhuadb: {
  2200. SiteTypeID: 0,
  2201. host: 'www.manhuadb.com',
  2202. functionStart: function() {if (/\/manhua\/\d+\/.+\.html/.test(location.pathname)) {
  2203. document.lastElementChild.appendChild(document.createElement('style')).textContent = '.row.m-0.pt-3.ad_2_wrap, .row.m-0.ad_1_wrap, .pagination.justify-content-center, #left, #right {display: none !important;}';
  2204. if (document.querySelector('img.img-fluid.show-pic')) document.querySelector('img.img-fluid.show-pic').style.display = 'none'; // 隐藏第一个图片(避免重复)
  2205. setTimeout(manhuadb_init, 100);
  2206. curSite = DBSite.manhuadb;
  2207. } else if (location.pathname.indexOf('/list') > -1) {
  2208. curSite = DBSite.manhuacat_list;
  2209. } else if (location.pathname.indexOf('/search') > -1 || location.pathname.indexOf('/update') > -1) {
  2210. curSite = DBSite.manhuacat_search;
  2211. }},
  2212. pager: {
  2213. type: 4,
  2214. nextLink: manhuadb_functionNext,
  2215. pageElement: 'css;body > script:not([type]):not([src]), .vg-r-data, ol.links-of-books.num_div',
  2216. insertPosition: ['css;.pjax-container', 3],
  2217. insertElement: manhuadb_insertElement,
  2218. intervals: 5000,
  2219. scrollDelta: 3000
  2220. }
  2221. }, // 漫画 DB
  2222. hicomic: {
  2223. SiteTypeID: 0,
  2224. host: 'www.hicomic.net',
  2225. functionStart: function() {if (location.pathname.indexOf('/chapters/') > -1) {
  2226. document.lastElementChild.appendChild(document.createElement('style')).textContent = '.content {height: auto !important;} .footer, .left_cursor, .right_cursor, .finish {display: none !important;} .content > img {display: block !important;margin: 0 auto !important;}';
  2227. setTimeout(hicomic_init, 100);
  2228. curSite = DBSite.hicomic;
  2229. }},
  2230. pager: {
  2231. type: 4,
  2232. nextLink: hicomic_functionNext,
  2233. insertPosition: ['css;.content', 3],
  2234. insertElement: hicomic_insertElement,
  2235. intervals: 5000,
  2236. scrollDelta: 3000
  2237. }
  2238. }, // HiComic (嗨漫画)
  2239. dmzj: {
  2240. SiteTypeID: 0,
  2241. host: 'www.dmzj.com',
  2242. functionStart: function() {if (location.pathname.indexOf('/view/') > -1) {
  2243. if (getCookie('display_mode') != '1') { // 强制开启 [上下滚动阅读] 模式
  2244. document.cookie='display_mode=1; expires=Thu, 18 Dec 2031 12:00:00 GMT; path=/'; // 写入 Cookie 开启 [上下滚动阅读] 模式
  2245. location.reload(); // 刷新网页
  2246. }
  2247. setTimeout(dmzj_init, 100);
  2248. curSite = DBSite.dmzj; document.lastElementChild.appendChild(document.createElement('style')).textContent = 'p.mh_curr_page, .btmBtnBox, .float_code, #floatCode {display: none !important;} .comic_wraCon > img {display: block !important;margin: 0 auto !important; border: none !important; padding: 0 !important; max-width: 99% !important; height: auto !important;}'; // 隐藏中间的页数信息
  2249. } else if (location.pathname.indexOf('/category') > -1 || location.pathname.indexOf('/update') > -1) {
  2250. curSite = DBSite.dmzj_list; document.lastElementChild.appendChild(document.createElement('style')).textContent = '.wrap_mhlist_l.con_left, .wrap_list {height: auto!important;}';
  2251. } else if (location.pathname.indexOf('/rank') > -1) {
  2252. curSite = DBSite.dmzj_rank; document.lastElementChild.appendChild(document.createElement('style')).textContent = '.wrap_mhlist_l.con_left {height: auto!important;}';
  2253. }},
  2254. pager: {
  2255. type: 4,
  2256. nextLink: dmzj_functionNext,
  2257. insertPosition: ['css;.comic_wraCon', 3],
  2258. insertElement: dmzj_insertElement,
  2259. replaceE: 'css;.wrap_last_mid, .wrap_last_head, title',
  2260. intervals: 2000,
  2261. scrollDelta: 3000
  2262. }
  2263. }, // 动漫之家 - 原创
  2264. dmzj_list: {
  2265. SiteTypeID: 0,
  2266. pager: {
  2267. type: 1,
  2268. nextLink: 'css;a.pg_next[href]',
  2269. pageElement: 'css;ul.list_con_li > li',
  2270. insertPosition: ['css;ul.list_con_li', 3],
  2271. replaceE: 'css;.page',
  2272. scrollDelta: 1000
  2273. }
  2274. }, // 动漫之家 - 原创 - 分类页
  2275. dmzj_rank: {
  2276. SiteTypeID: 0,
  2277. pager: {
  2278. type: 1,
  2279. nextLink: 'css;a.pg_next[href]',
  2280. pageElement: 'css;.ph_r_con_li > div:not(.ad_column)',
  2281. insertPosition: ['css;.ph_r_con_li', 3],
  2282. replaceE: 'css;.page',
  2283. scrollDelta: 1000
  2284. }
  2285. }, // 动漫之家 - 原创 - 排行榜
  2286. dmzj_manhua: {
  2287. SiteTypeID: 0,
  2288. host: 'manhua.dmzj.com',
  2289. functionStart: function() {if (/\/\d+\.shtml/.test(location.pathname)) {
  2290. let chapterScroll = document.getElementById('qiehuan_txt') // 强制为 [上下滚动阅读] 模式
  2291. if (chapterScroll && chapterScroll.textContent === '切换到上下滚动阅读') {chapterScroll.click();}
  2292. setTimeout(dmzj_manhua_init, 100);
  2293. curSite = DBSite.dmzj_manhua; document.lastElementChild.appendChild(document.createElement('style')).textContent = 'p.curr_page, .btmBtnBox, .float_code, #floatCode {display: none !important;} #center_box > img {display: block !important;margin: 0 auto !important; border: none !important; padding: 0 !important; max-width: 99% !important; height: auto !important;}'; // 隐藏中间的页数信息
  2294. /*} else if (location.pathname.indexOf('/tags/search') > -1) {
  2295. curSite = DBSite.dmzj_manhua_search;
  2296. } else if (location.pathname.indexOf('/tags/') > -1) {
  2297. curSite = DBSite.dmzj_manhua_list;*/
  2298. } else if (location.pathname.indexOf('/update') > -1) {
  2299. curSite = DBSite.dmzj_manhua_update;
  2300. }},
  2301. pager: {
  2302. type: 4,
  2303. nextLink: dmzj_manhua_functionNext,
  2304. insertPosition: ['css;#center_box', 3],
  2305. insertElement: dmzj_manhua_insertElement,
  2306. replaceE: 'css;.display_graybg, title',
  2307. intervals: 2000,
  2308. scrollDelta: 3000
  2309. }
  2310. }, // 动漫之家 - 日漫
  2311. dmzj_manhua_search: {
  2312. SiteTypeID: 0,
  2313. pager: {
  2314. type: 1,
  2315. nextLink: '//div[@class="pages"]/a[contains(text(), "下一页")]',
  2316. forceHTTPS: true,
  2317. pageElement: 'css;.tcaricature_block ul',
  2318. insertPosition: ['css;.tcaricature_block', 3],
  2319. replaceE: 'css;.pages',
  2320. scrollDelta: 1000
  2321. },
  2322. function: {
  2323. after: function() {
  2324. document.body.appendChild(document.createElement('script')).src = document.querySelector('head > script[src*="/js/ps.js"]').src;
  2325. }
  2326. }
  2327. }, //动漫之家 - 日漫 - 搜索页
  2328. dmzj_manhua_list: {
  2329. SiteTypeID: 0,
  2330. pager: {
  2331. type: 1,
  2332. nextLink: '//div[@class="pages"]/a[contains(text(), "下一页")]',
  2333. forceHTTPS: true,
  2334. pageElement: 'css;.tcaricature_block ul',
  2335. insertPosition: ['css;.pages', 1],
  2336. replaceE: 'css;.pages',
  2337. scrollDelta: 1000
  2338. },
  2339. function: {
  2340. after: function() {
  2341. document.body.appendChild(document.createElement('script')).src = document.querySelector('head > script[src*="/js/csearch.js"]').src;
  2342. }
  2343. }
  2344. }, // 动漫之家 - 日漫 - 分类页
  2345. dmzj_manhua_update: {
  2346. SiteTypeID: 0,
  2347. pager: {
  2348. type: 1,
  2349. nextLink: '//div[@class="pages"]/a[contains(text(), "下一页")]',
  2350. pageElement: 'css;.newpic_content > *:not(.pages)',
  2351. insertPosition: ['css;.newpic_content', 3],
  2352. replaceE: 'css;.pages',
  2353. scrollDelta: 1000
  2354. }
  2355. }, //动漫之家 - 日漫 - 最新更新
  2356. copymanga: {
  2357. SiteTypeID: 0,
  2358. host: 'www.copymanga.com',
  2359. functionStart: function() {if (location.pathname.indexOf('/chapter/') > -1) {
  2360. curSite = DBSite.copymanga; document.lastElementChild.appendChild(document.createElement('style')).textContent = '.upMember, .comicContainerAds, .footer {display: none !important;}';
  2361. } else if (location.pathname.indexOf('/comics') > -1) {
  2362. curSite = DBSite.copymanga_list;
  2363. }},
  2364. pager: {
  2365. type: 4,
  2366. nextLink: copymanga_functionNext,
  2367. insertPosition: ['css;ul.comicContent-image-list > li:first-child', 1],
  2368. insertElement: copymanga_insertElement,
  2369. replaceE: 'css;.disposableData, .disposablePass, .disposableUrlPrefix, .disposableUrlSuffix, .footer, h4.header, title',
  2370. intervals: 5000,
  2371. scrollDelta: 3000
  2372. }
  2373. }, // 拷贝漫画
  2374. copymanga_list: {
  2375. SiteTypeID: 0,
  2376. pager: {
  2377. type: 1,
  2378. nextLink: 'css;li.next > a[href]',
  2379. pageElement: 'css;.exemptComic-box > div',
  2380. insertPosition: ['css;.exemptComic-box', 3],
  2381. replaceE: 'css;ul.page-all',
  2382. scrollDelta: 1500
  2383. },
  2384. function: {
  2385. before: src_functionBefore,
  2386. parameter: [0, 'img[data-src]', 'data-src']
  2387. }
  2388. }, // 拷贝漫画 - 分类页
  2389. mhxqiu: {
  2390. SiteTypeID: 0,
  2391. host: 'www.mhxqiu.com',
  2392. functionStart: function() {if (/\/\d+\.html/.test(location.pathname)) { // 阅读页
  2393. curSite = DBSite.mhxqiu; document.lastElementChild.appendChild(document.createElement('style')).textContent = '.imgFloat_1, .imgFloat_2, .main_control {display: none !important;} body {height: auto !important;}';
  2394. } else if (/\/\d+\/$/.test(location.pathname)) { // 目录页
  2395. setTimeout(function(){if (document.getElementById('zhankai')) document.getElementById('zhankai').click();}, 500)
  2396. } else if (/\/(sort|rank)\//.test(location.pathname)) { // 分类页
  2397. curSite = DBSite.mhxqiu_list;
  2398. }},
  2399. pager: {
  2400. type: 4,
  2401. nextLink: mhxqiu_functionNext,
  2402. insertPosition: ['css;#comicContain', 3],
  2403. insertElement: mhxqiu_insertElement,
  2404. replaceE: 'css;#mainControlNext, h1.chaptername_title, title',
  2405. intervals: 5000,
  2406. scrollDelta: 3000
  2407. }
  2408. }, // 漫画星球
  2409. mhxqiu_list: {
  2410. SiteTypeID: 0,
  2411. pager: {
  2412. type: 1,
  2413. nextLink: '//div[@class="NewPages"]//a[contains(text(), "下一页")]',
  2414. pageElement: 'css;.cy_list_mh > ul',
  2415. insertPosition: ['css;.cy_list_mh', 3],
  2416. replaceE: 'css;.NewPages',
  2417. scrollDelta: 1000
  2418. }
  2419. }, // 漫画星球 - 分类页
  2420. gufengmh: {
  2421. SiteTypeID: 0,
  2422. host: /gufengmh/,
  2423. functionStart: function() {if (/\/\d+.+\.html/.test(location.pathname)) {
  2424. let chapterScroll = document.getElementById('chapter-scroll') // 强制为 [下拉阅读] 模式
  2425. if (chapterScroll && chapterScroll.className === '') {chapterScroll.click();}
  2426. curSite = DBSite.gufengmh; document.lastElementChild.appendChild(document.createElement('style')).textContent = 'p.img_info {display: none !important;}'; // 隐藏中间的页数信息
  2427. } else if (location.pathname.indexOf('/update') > -1 || location.pathname.indexOf('/list') > -1 || location.pathname.indexOf('/search') > -1) {
  2428. curSite = DBSite.gufengmh_list;
  2429. }},
  2430. pager: {
  2431. type: 4,
  2432. nextLink: gufengmh_functionNext,
  2433. pageElement: 'css;body > script:first-child',
  2434. insertPosition: ['css;#images', 3],
  2435. insertElement: gufengmh_insertElement,
  2436. intervals: 5000,
  2437. scrollDelta: 4000
  2438. }
  2439. }, // 古风漫画网
  2440. gufengmh_list: {
  2441. SiteTypeID: 0,
  2442. pager: {
  2443. type: 1,
  2444. nextLink: 'css;li.next > a[href]',
  2445. pageElement: 'css;ul.book-list > li',
  2446. insertPosition: ['css;ul.book-list', 3],
  2447. replaceE: 'css;ul.pagination',
  2448. scrollDelta: 1000
  2449. }
  2450. }, // 古风漫画网 - 分类页
  2451. szcdmj: {
  2452. SiteTypeID: 0,
  2453. host: 'www.szcdmj.com',
  2454. functionStart: function() {if (location.pathname.indexOf('/szcchapter/') > -1) {curSite = DBSite.szcdmj; document.lastElementChild.appendChild(document.createElement('style')).textContent = '.header {opacity: 0.3 !important;}';}},
  2455. pager: {
  2456. type: 1,
  2457. nextLink: '//div[@class="fanye"][1]/a[@href][text()="下一页" or text()="下一话"]',
  2458. pageElement: 'css;.comicpage > div,title',
  2459. insertPosition: ['css;.comicpage', 3],
  2460. replaceE: 'css;.fanye,h1.title',
  2461. scrollDelta: 2000
  2462. },
  2463. function: {
  2464. before: szcdmj_functionBefore
  2465. }
  2466. }, // 砂之船动漫家
  2467. mangabz: {
  2468. SiteTypeID: 0,
  2469. host: 'mangabz.com',
  2470. functionStart: function() {if (/\/m\d+/.test(location.pathname)) {
  2471. setTimeout(mangabz_init, 500);
  2472. curSite = DBSite.mangabz;
  2473. document.lastElementChild.appendChild(document.createElement('style')).textContent = 'body > .container > div:not([id]) {display: none !important;} .top-bar {opacity: 0.3 !important;} #cp_img > img{display: block !important;margin: 0 auto !important;width: auto !important; height: auto !important;}';
  2474. } else if (/\/\d+bz\//.test(location.pathname)) {
  2475. if (document.querySelector('.detail-list-form-more')) document.querySelector('.detail-list-form-more').click();
  2476. } else if (location.pathname.indexOf('/manga-list') > -1 || location.pathname === '/search') {
  2477. curSite = DBSite.mangabz_list;
  2478. }},
  2479. pager: {
  2480. type: 4,
  2481. nextLink: mangabz_functionNext,
  2482. insertPosition: ['css;#cp_img', 3],
  2483. insertElement: mangabz_insertElement,
  2484. replaceE: 'css;p.top-title, body > .container > div:not([id]), title',
  2485. intervals: 500,
  2486. scrollDelta: 1000
  2487. }
  2488. }, // Mangabz 漫画
  2489. mangabz_list: {
  2490. SiteTypeID: 0,
  2491. pager: {
  2492. type: 1,
  2493. nextLink: '//div[@class="page-pagination"]//a[@href][contains(text(), ">")]',
  2494. pageElement: 'css;ul.mh-list > li',
  2495. insertPosition: ['css;ul.mh-list', 3],
  2496. replaceE: 'css;.page-pagination',
  2497. scrollDelta: 800
  2498. }
  2499. }, // Mangabz 漫画 - 分类/搜索页
  2500. _423down: {
  2501. SiteTypeID: 0,
  2502. host: 'www.423down.com',
  2503. functionStart: function() {if (location.pathname.indexOf('.html') === -1) curSite = DBSite._423down;},
  2504. pager: {
  2505. type: 1,
  2506. nextLink: '//div[@class="paging"]//a[contains(text(),"下一页")][@href]',
  2507. pageElement: 'css;div.content-wrap ul.excerpt > li',
  2508. insertPosition: ['css;div.content-wrap ul.excerpt', 3],
  2509. replaceE: 'css;div.paging',
  2510. scrollDelta: 1500
  2511. }
  2512. }, // 423Down
  2513. iao_su: {
  2514. SiteTypeID: 0,
  2515. host: 'iao.su',
  2516. pager: {
  2517. type: 1,
  2518. nextLink: '//li[@class="btn btn-primary next"]//a[@href]',
  2519. pageElement: 'css;#index > article, #archive > article',
  2520. insertPosition: ['css;ol.page-navigator', 1],
  2521. replaceE: 'css;ol.page-navigator',
  2522. scriptType: 4,
  2523. scrollDelta: 1000
  2524. }
  2525. }, // 不死鸟
  2526. sharerw: {
  2527. SiteTypeID: 0,
  2528. host: 'www.sharerw.com',
  2529. functionStart: function() {if (location.pathname.indexOf('.html') === -1) {
  2530. if (location.pathname === '/search.php') {curSite = DBSite.sharerw_search;} else {curSite = DBSite.sharerw;};};},
  2531. pager: {
  2532. type: 1,
  2533. nextLink: 'css;span.next > a[href]',
  2534. pageElement: 'css;.new-post > article',
  2535. insertPosition: ['css;.new-post', 3],
  2536. replaceE: 'css;.pagebar',
  2537. scrollDelta: 1500
  2538. }
  2539. }, // 分享者
  2540. sharerw_search: {
  2541. SiteTypeID: 0,
  2542. pager: {
  2543. type: 1,
  2544. nextLink: 'css;span.next > a[href]',
  2545. pageElement: 'css;#mainbox > article',
  2546. insertPosition: ['css;.pagebar', 1],
  2547. replaceE: 'css;.pagebar',
  2548. scrollDelta: 1500
  2549. }
  2550. }, // 分享者 - 搜索页
  2551. extfans: {
  2552. SiteTypeID: 0,
  2553. host: 'www.extfans.com',
  2554. functionStart: function() {if (location.pathname != '/') {curSite = DBSite.extfans;}},
  2555. pager: {
  2556. type: 1,
  2557. nextLink: 'css;.page a[data-page="next"]',
  2558. pageElement: 'css;.side-left > ul[class*="-list"] > li',
  2559. insertPosition: ['css;.side-left > ul[class*="-list"]', 3],
  2560. replaceE: 'css;.page',
  2561. scrollDelta: 2000
  2562. }
  2563. }, // 扩展迷
  2564. chrome_zzzmh: {
  2565. SiteTypeID: 0,
  2566. host: 'chrome.zzzmh.cn',
  2567. pager: {
  2568. type: 2,
  2569. nextLink: 'button.more-btn',
  2570. intervals: 1000,
  2571. scrollDelta: 1500
  2572. }
  2573. }, // 极简插件
  2574. appinn: {
  2575. SiteTypeID: 0,
  2576. host: 'www.appinn.com',
  2577. pager: {
  2578. type: 1,
  2579. nextLink: '//a[@class="next page-numbers"][@href]',
  2580. pageElement: 'css;section#latest-posts > article',
  2581. insertPosition: ['css;nav.navigation.pagination', 1],
  2582. replaceE: 'css;div.nav-links',
  2583. scrollDelta: 1500
  2584. }
  2585. }, // 小众软件
  2586. isharepc: {
  2587. SiteTypeID: 0,
  2588. host: 'www.isharepc.com',
  2589. pager: {
  2590. type: 1,
  2591. nextLink: 'css;a.next[href]',
  2592. pageElement: 'css;.content > div',
  2593. insertPosition: ['css;nav.pagination', 1],
  2594. replaceE: 'css;nav.pagination',
  2595. scrollDelta: 1000
  2596. }
  2597. }, // 乐软博客
  2598. pc521: {
  2599. SiteTypeID: 0,
  2600. host: 'www.pc521.net',
  2601. functionStart: function() {if (location.search.slice(0,3) === '?s=') {curSite = DBSite.pc521_search;} else {curSite = DBSite.pc521;}},
  2602. pager: {
  2603. type: 2,
  2604. nextLink: 'div[id^="ias_trigger_"]',
  2605. intervals: 1000,
  2606. scrollDelta: 1000
  2607. }
  2608. }, // 不忘初心
  2609. pc521_search: {
  2610. SiteTypeID: 0,
  2611. pager: {
  2612. type: 1,
  2613. nextLink: 'css;a.next[href]',
  2614. pageElement: 'css;#main > ul > li',
  2615. insertPosition: ['css;#main > ul', 3],
  2616. replaceE: 'css;nav.pagination',
  2617. scrollDelta: 1500
  2618. }
  2619. }, // 不忘初心 - 搜索页
  2620. ghxi: {
  2621. SiteTypeID: 0,
  2622. host: 'www.ghxi.com',
  2623. functionStart: function() {if (location.pathname === '/' && !location.search) {curSite = DBSite.ghxi;} else {curSite = DBSite.ghxi_postlist;}},
  2624. pager: {
  2625. type: 2,
  2626. nextLink: '.load-more',
  2627. intervals: 1000,
  2628. scrollDelta: 5000
  2629. }
  2630. }, // 果核剥壳 - 首页
  2631. ghxi_postlist: {
  2632. SiteTypeID: 0,
  2633. pager: {
  2634. type: 1,
  2635. nextLink: 'css;a.next[href]',
  2636. pageElement: 'css;ul.post-loop > li',
  2637. insertPosition: ['css;ul.post-loop', 3],
  2638. replaceE: 'css;ul.pagination',
  2639. scrollDelta: 1500
  2640. },
  2641. function: {
  2642. before: src_functionBefore
  2643. }
  2644. }, // 果核剥壳 - 分类/搜索页
  2645. sixyin: {
  2646. SiteTypeID: 0,
  2647. host: 'www.sixyin.com',
  2648. functionStart: function() {if (location.pathname === '/' && location.search === '') { // 首页
  2649. curSite = DBSite.sixyin;
  2650. } else if (location.pathname.indexOf('.html') === -1) { // 分类页
  2651. curSite = DBSite.sixyin_postlist;
  2652. }},
  2653. pager: {
  2654. type: 2,
  2655. nextLink: '.load-more',
  2656. nextHTML: '点击查看更多',
  2657. scrollDelta: 1500
  2658. }
  2659. }, // 六音软件 - 首页
  2660. sixyin_postlist: {
  2661. SiteTypeID: 0,
  2662. pager: {
  2663. type: 1,
  2664. nextLink: '//a[@class="next"][@href]',
  2665. pageElement: 'css;ul.post-loop > li',
  2666. insertPosition: ['css;ul.post-loop', 3],
  2667. replaceE: 'css;ul.pagination',
  2668. scrollDelta: 1500
  2669. }
  2670. }, // 六音软件 - 分类页
  2671. weidown: {
  2672. SiteTypeID: 0,
  2673. host: 'www.weidown.com',
  2674. functionStart: function() {if (location.pathname.indexOf('/search/') > -1) { //搜索页
  2675. curSite = DBSite.weidown_search;
  2676. } else if (location.pathname.indexOf('/special/') > -1) { // 专题页
  2677. curSite = DBSite.weidown_special;
  2678. } else {
  2679. curSite = DBSite.weidown;
  2680. }},
  2681. pager: {
  2682. type: 1,
  2683. nextLink: '//a[@class="nextpage"][@href]',
  2684. pageElement: 'css;.articleWrapper > .itemArticle, .articleWrapper > .richTextItem.search',
  2685. insertPosition: ['css;.articleWrapper', 3],
  2686. replaceE: 'css;#pageGroup',
  2687. scrollDelta: 1500
  2688. }
  2689. }, // 微当下载
  2690. weidown_search: {
  2691. SiteTypeID: 0,
  2692. pager: {
  2693. type: 1,
  2694. nextLink: '//a[@class="nextpage"][@href]',
  2695. pageElement: 'css;.articleListWrapper > .richTextItem.search',
  2696. insertPosition: ['css;#pageGroup', 1],
  2697. replaceE: 'css;#pageGroup',
  2698. scrollDelta: 700
  2699. }
  2700. }, // 微当下载 - 搜索页
  2701. weidown_special: {
  2702. SiteTypeID: 0,
  2703. pager: {
  2704. type: 1,
  2705. nextLink: '//a[@class="nextpage"][@href]',
  2706. pageElement: 'css;.special > .item',
  2707. insertPosition: ['css;.special', 3],
  2708. replaceE: 'css;#pageGroup',
  2709. scrollDelta: 700
  2710. }
  2711. }, // 微当下载 - 专题页
  2712. th_sjy: {
  2713. SiteTypeID: 0,
  2714. host: 'www.th-sjy.com',
  2715. pager: {
  2716. type: 1,
  2717. nextLink: 'css;li.next-page > a',
  2718. pageElement: 'css;.content > article',
  2719. insertPosition: ['css;.pagination', 1],
  2720. replaceE: 'css;.pagination',
  2721. scrollDelta: 2000
  2722. }
  2723. }, // th-sjy 汉化
  2724. fsylr: {
  2725. SiteTypeID: 0,
  2726. host: 'fsylr.com',
  2727. functionStart: function() {if (location.pathname.indexOf('.html') === -1) {curSite = DBSite.fsylr;}},
  2728. pager: {
  2729. type: 1,
  2730. nextLink: 'css;a.next.page-numbers[href]',
  2731. pageElement: 'css;.posts-con > div:not([class*="posts-"])',
  2732. insertPosition: ['css;.posts-con', 3],
  2733. replaceE: 'css;nav.pagination',
  2734. scrollDelta: 1000
  2735. }
  2736. }, // 发烧友绿软
  2737. iplaysoft_postslist: {
  2738. SiteTypeID: 0,
  2739. host: 'www.iplaysoft.com',
  2740. functionStart: function() {if (location.pathname.indexOf('.html') > -1 || location.pathname.indexOf('/p/') > -1) { // 文章内
  2741. curSite = DBSite.iplaysoft_postcomments;
  2742. } else { // 其他页面
  2743. curSite = DBSite.iplaysoft_postslist;
  2744. }},
  2745. pager: {
  2746. type: 1,
  2747. nextLink: '//div[@class="pagenavi"]//a[@title="下一页"][@href]',
  2748. pageElement: 'css;#postlist > div.entry',
  2749. insertPosition: ['css;#postlist > .pagenavi-button', 1],
  2750. replaceE: 'css;.pagenavi-button, .pagenavi',
  2751. scrollDelta: 1200
  2752. },
  2753. function: {
  2754. before: src_functionBefore,
  2755. parameter: [0, 'img[data-src]', 'data-src']
  2756. }
  2757. }, // 异次元软件
  2758. iplaysoft_postcomments: {
  2759. SiteTypeID: 0,
  2760. pager: {
  2761. type: 2,
  2762. nextLink: '#loadHistoryComments',
  2763. nextTextOf: '展开后面',
  2764. scrollDelta: 1200
  2765. }
  2766. }, // 异次元软件 - 评论
  2767. mpyit: {
  2768. SiteTypeID: 0,
  2769. host: 'www.mpyit.com',
  2770. functionStart: function() {if (location.pathname === '/' && !location.search) {
  2771. curSite = DBSite.mpyit;
  2772. } else if (location.pathname.indexOf('/category/') > -1 || location.search.indexOf('?s=') > -1) { // 搜索页 / 分类页
  2773. curSite = DBSite.mpyit_category;
  2774. }},
  2775. pager: {
  2776. type: 1,
  2777. nextLink: '//a[@class="page-numbers"][@title="下一页"][@href]',
  2778. pageElement: 'css;#post > div[id^="post-"]',
  2779. insertPosition: ['css;#post > #pagenavi', 1],
  2780. replaceE: 'css;#post > #pagenavi',
  2781. scrollDelta: 1700
  2782. }
  2783. }, // 老殁 | 殁漂遥
  2784. mpyit_category: {
  2785. SiteTypeID: 0,
  2786. pager: {
  2787. type: 1,
  2788. nextLink: '//a[@class="page-numbers"][@title="下一页"][@href]',
  2789. pageElement: 'css;#content > div[class^="entry_box"]',
  2790. insertPosition: ['css;#content > #pagenavi', 1],
  2791. replaceE: 'css;#content > #pagenavi',
  2792. scrollDelta: 1700
  2793. }
  2794. }, // 老殁 | 殁漂遥 - 搜索页/分类页
  2795. yxssp: {
  2796. SiteTypeID: 0,
  2797. host: 'www.yxssp.com',
  2798. pager: {
  2799. type: 1,
  2800. nextLink: '//div[@class="page-nav td-pb-padding-side"]/a[last()][@href]',
  2801. pageElement: 'css;.td-modules-container.td-module-number4 > div',
  2802. insertPosition: ['css;.td-modules-container.td-module-number4', 3],
  2803. replaceE: 'css;.page-nav.td-pb-padding-side',
  2804. scrollDelta: 1000
  2805. }
  2806. }, // 异星软件空间
  2807. sordum: {
  2808. SiteTypeID: 0,
  2809. host: 'www.sordum.org',
  2810. pager: {
  2811. type: 1,
  2812. nextLink: '//a[@class="next page-numbers"][@href]',
  2813. pageElement: 'css;.article > article',
  2814. insertPosition: ['css;nav.navigation.posts-navigation', 1],
  2815. replaceE: 'css;nav.navigation.posts-navigation',
  2816. scrollDelta: 1500
  2817. }
  2818. }, // (下面这几个都是国外博客网站)
  2819. winaero: {
  2820. SiteTypeID: 0,
  2821. host: 'winaero.com',
  2822. functionStart: function() {if (location.pathname === '/blog/' || location.pathname.indexOf('/category/') > -1) curSite = DBSite.winaero;},
  2823. pager: {
  2824. type: 1,
  2825. nextLink: 'css;.nav-previous > a',
  2826. pageElement: 'css;#content > article',
  2827. insertPosition: ['css;#nav-below', 1],
  2828. replaceE: 'css;#nav-below',
  2829. scrollDelta: 1500
  2830. }
  2831. },
  2832. lrepacks: {
  2833. SiteTypeID: 0,
  2834. host: 'lrepacks.net',
  2835. functionStart: function() {if (location.pathname.indexOf('.html') === -1) curSite = DBSite.lrepacks;},
  2836. pager: {
  2837. type: 1,
  2838. nextLink: 'css;.page_next > a',
  2839. pageElement: 'css;#main .post-list article',
  2840. insertPosition: ['css;.page_nav', 1],
  2841. replaceE: 'css;.page_nav',
  2842. scrollDelta: 1500
  2843. },
  2844. function: {
  2845. before: lrepacks_functionBefore
  2846. }
  2847. },
  2848. winhelponline: {
  2849. SiteTypeID: 0,
  2850. host: 'www.winhelponline.com',
  2851. functionStart: function() {if (location.pathname === '/blog/') {curSite = DBSite.winhelponline;}},
  2852. pager: {
  2853. type: 1,
  2854. nextLink: 'css;span.prev > a[href]',
  2855. pageElement: 'css;#main > article',
  2856. insertPosition: ['css;nav.paging-navigation', 1],
  2857. replaceE: 'css;nav.paging-navigation',
  2858. scrollDelta: 2000
  2859. }
  2860. },
  2861. windowslatest: {
  2862. SiteTypeID: 0,
  2863. host: 'www.windowslatest.com',
  2864. pager: {
  2865. type: 1,
  2866. nextLink: '//div[contains(@class, "page-nav")]/a/i[@class="td-icon-menu-right"]/parent::a',
  2867. pageElement: 'css;.td-ss-main-content > div:not(.td-block-title-wrap):not(.page-nav)',
  2868. insertPosition: ['css;.page-nav', 1],
  2869. replaceE: 'css;.page-nav',
  2870. scrollDelta: 2000
  2871. }
  2872. },
  2873. thewindowsclub: {
  2874. SiteTypeID: 0,
  2875. host: 'www.thewindowsclub.com',
  2876. functionStart: function() {curSite = DBSite.thewindowsclub; if (location.pathname === '/') {curSite.pager.scrollDelta = 2000;}},
  2877. pager: {
  2878. type: 1,
  2879. nextLink: 'css;li.pagination-next > a',
  2880. pageElement: 'css;#genesis-content > article',
  2881. insertPosition: ['css;.pagination', 1],
  2882. replaceE: 'css;.pagination',
  2883. scrollDelta: 1500
  2884. }
  2885. },
  2886. gitee: {
  2887. SiteTypeID: 0,
  2888. host: 'search.gitee.com',
  2889. functionStart: function() {if (location.search) curSite = DBSite.gitee;},
  2890. pager: {
  2891. type: 1,
  2892. nextLink: 'css;li.next > a[href]',
  2893. pageElement: 'css;#hits-list > div',
  2894. insertPosition: ['css;#hits-list', 3],
  2895. replaceE: 'css;ul.pagination',
  2896. scrollDelta: 1000
  2897. }
  2898. }, // Gitee - 搜索页
  2899. github_star: {
  2900. SiteTypeID: 0,
  2901. host: 'github.com',
  2902. functionStart: function() {locationchange = true;
  2903. if (location.search.indexOf('tab=stars') > -1) {
  2904. curSite = DBSite.github_star;
  2905. } else if ((location.pathname.indexOf('/issues') > -1 && location.pathname.indexOf('/issues/') === -1) || (location.pathname.indexOf('/pulls') > -1 && location.pathname.indexOf('/pulls/') === -1)) {
  2906. curSite = DBSite.github_issues;
  2907. } else if (location.pathname.indexOf('/discussions') > -1 && !(/\/discussions\/\d+/.test(location.pathname)) && location.pathname.indexOf('new') === -1) {
  2908. curSite = DBSite.github_discussions;
  2909. } else if (location.pathname.indexOf('/releases') > -1 && location.pathname.indexOf('/releases/tag/') === -1 && location.pathname.indexOf('edit') === -1) {
  2910. curSite = DBSite.github_releases;
  2911. } else if (location.pathname.indexOf('/tags') > -1 && location.pathname.indexOf('/tags/') === -1) {
  2912. curSite = DBSite.github_tags;
  2913. } else if (location.pathname.indexOf('/commits') > -1) {
  2914. curSite = DBSite.github_commits;
  2915. } else if (location.pathname.indexOf('/search') > -1) {
  2916. if (!location.search) return
  2917. if (location.search.indexOf('type=Repositories') > -1 || location.search.indexOf('type=') === -1) {
  2918. curSite = DBSite.github_search;
  2919. } else if (location.search.indexOf('type=code') > -1) {
  2920. curSite = DBSite.github_search_code;
  2921. } else if (location.search.indexOf('type=commits') > -1) {
  2922. curSite = DBSite.github_search_commit;
  2923. } else if (location.search.indexOf('type=issues') > -1 || location.search.indexOf('type=discussions') > -1) {
  2924. curSite = DBSite.github_search_issue;
  2925. } else if (location.search.indexOf('type=registrypackages') > -1) {
  2926. curSite = DBSite.github_search_package;
  2927. } else if (location.search.indexOf('type=marketplace') > -1) {
  2928. curSite = DBSite.github_search_marketplace;
  2929. } else if (location.search.indexOf('type=topics') > -1) {
  2930. curSite = DBSite.github_search_topics;
  2931. } else if (location.search.indexOf('type=wikis') > -1) {
  2932. curSite = DBSite.github_search_wiki;
  2933. } else if (location.search.indexOf('type=users') > -1) {
  2934. curSite = DBSite.github_search_user;
  2935. }
  2936. }},
  2937. pager: {
  2938. type: 1,
  2939. nextLink: '//div[@class="paginate-container"]//a[@href][contains(text(), "Next")]',
  2940. pageElement: 'css;#js-pjax-container .position-relative div[class^="col-lg-"] > div:not(.position-relative):not(.paginate-container)',
  2941. insertPosition: ['css;.paginate-container', 1],
  2942. replaceE: 'css;.paginate-container',
  2943. scrollDelta: 3000
  2944. }
  2945. }, // Github - 用户 Star 列表
  2946. github_issues: {
  2947. SiteTypeID: 0,
  2948. pager: {
  2949. type: 1,
  2950. nextLink: 'css;a.next_page',
  2951. pageElement: 'css;.js-navigation-container.js-active-navigation-container > div[id^="issue_"]',
  2952. insertPosition: ['css;.js-navigation-container.js-active-navigation-container', 3],
  2953. replaceE: 'css;.pagination',
  2954. scrollDelta: 3000
  2955. }
  2956. }, // Github - Issues 列表 / PR 列表
  2957. github_discussions: {
  2958. SiteTypeID: 0,
  2959. pager: {
  2960. type: 1,
  2961. nextLink: 'css;a.next_page',
  2962. pageElement: 'css;#repo-content-pjax-container div[data-discussion-hovercards-enabled] > div',
  2963. insertPosition: ['css;#repo-content-pjax-container div[data-discussion-hovercards-enabled]', 3],
  2964. replaceE: 'css;.pagination',
  2965. scrollDelta: 3000
  2966. }
  2967. }, // Github - Discussions 列表
  2968. github_releases: {
  2969. SiteTypeID: 0,
  2970. pager: {
  2971. type: 1,
  2972. nextLink: '//div[@class="pagination"]/a[contains(text(), "Next")]',
  2973. pageElement: 'css;.repository-content >.position-relative > div',
  2974. insertPosition: ['css;.repository-content >.position-relative', 3],
  2975. replaceE: 'css;.pagination',
  2976. scrollDelta: 3000
  2977. }
  2978. }, // Github - Releases 列表
  2979. github_tags: {
  2980. SiteTypeID: 0,
  2981. pager: {
  2982. type: 1,
  2983. nextLink: '//div[@class="pagination"]/a[contains(text(), "Next")]',
  2984. pageElement: 'css;.repository-content > .Box > div.Box-row',
  2985. insertPosition: ['css;.repository-content > .Box', 3],
  2986. replaceE: 'css;.pagination',
  2987. scrollDelta: 3000
  2988. }
  2989. }, // Github - Tags 列表
  2990. github_commits: {
  2991. SiteTypeID: 0,
  2992. pager: {
  2993. type: 1,
  2994. nextLink: '//div[@class="paginate-container"]//a[contains(text(), "Older")]',
  2995. pageElement: 'css;div.js-navigation-container > div',
  2996. insertPosition: ['css;div.js-navigation-container', 3],
  2997. replaceE: 'css;.paginate-container',
  2998. scrollDelta: 3000
  2999. }
  3000. }, // Github - Commits 列表
  3001. github_search: {
  3002. SiteTypeID: 0,
  3003. pager: {
  3004. type: 1,
  3005. nextLink: 'css;a.next_page',
  3006. pageElement: 'css;ul.repo-list > li',
  3007. insertPosition: ['css;ul.repo-list', 3],
  3008. replaceE: 'css;.pagination',
  3009. scrollDelta: 1500
  3010. }
  3011. }, // Github - Search 列表
  3012. github_search_code: {
  3013. SiteTypeID: 0,
  3014. pager: {
  3015. type: 1,
  3016. nextLink: 'css;a.next_page',
  3017. pageElement: 'css;.code-list > div',
  3018. insertPosition: ['css;.code-list', 3],
  3019. replaceE: 'css;.pagination',
  3020. scrollDelta: 1500
  3021. }
  3022. }, // Github - Search 列表 - Code
  3023. github_search_commit: {
  3024. SiteTypeID: 0,
  3025. pager: {
  3026. type: 1,
  3027. nextLink: 'css;a.next_page',
  3028. pageElement: 'css;#commit_search_results > div',
  3029. insertPosition: ['css;#commit_search_results', 3],
  3030. replaceE: 'css;.pagination',
  3031. scrollDelta: 1500
  3032. }
  3033. }, // Github - Search 列表 - Commit
  3034. github_search_issue: {
  3035. SiteTypeID: 0,
  3036. pager: {
  3037. type: 1,
  3038. nextLink: 'css;a.next_page',
  3039. pageElement: 'css;.issue-list > div > div',
  3040. insertPosition: ['css;.issue-list > div', 3],
  3041. replaceE: 'css;.pagination',
  3042. scrollDelta: 1500
  3043. }
  3044. }, // Github - Search 列表 - Issues/Discussions
  3045. github_search_package: {
  3046. SiteTypeID: 0,
  3047. pager: {
  3048. type: 1,
  3049. nextLink: 'css;a.next_page',
  3050. pageElement: 'css;#package_search_results > div',
  3051. insertPosition: ['css;#package_search_results', 3],
  3052. replaceE: 'css;.pagination',
  3053. scrollDelta: 1500
  3054. }
  3055. }, // Github - Search 列表 - Package
  3056. github_search_marketplace: {
  3057. SiteTypeID: 0,
  3058. pager: {
  3059. type: 1,
  3060. nextLink: 'css;a.next_page',
  3061. pageElement: 'css;.issue-list > div',
  3062. insertPosition: ['css;.issue-list', 3],
  3063. replaceE: 'css;.pagination',
  3064. scrollDelta: 1500
  3065. }
  3066. }, // Github - Search 列表 - Marketplace
  3067. github_search_topics: {
  3068. SiteTypeID: 0,
  3069. pager: {
  3070. type: 1,
  3071. nextLink: 'css;a.next_page',
  3072. pageElement: 'css;.topic-list > div',
  3073. insertPosition: ['css;.topic-list', 3],
  3074. replaceE: 'css;.pagination',
  3075. scrollDelta: 1500
  3076. }
  3077. }, // Github - Search 列表 - Topics
  3078. github_search_wiki: {
  3079. SiteTypeID: 0,
  3080. pager: {
  3081. type: 1,
  3082. nextLink: 'css;a.next_page',
  3083. pageElement: 'css;#wiki_search_results > div:first-child > div',
  3084. insertPosition: ['css;#wiki_search_results > div:first-child', 3],
  3085. replaceE: 'css;.pagination',
  3086. scrollDelta: 1500
  3087. }
  3088. }, // Github - Search 列表 - wiki
  3089. github_search_user: {
  3090. SiteTypeID: 0,
  3091. pager: {
  3092. type: 1,
  3093. nextLink: 'css;a.next_page',
  3094. pageElement: 'css;#user_search_results > div:first-child > div',
  3095. insertPosition: ['css;#user_search_results > div:first-child', 3],
  3096. replaceE: 'css;.pagination',
  3097. scrollDelta: 1500
  3098. }
  3099. }, // Github - Search 列表 - user
  3100. stackoverflow: {
  3101. SiteTypeID: 0,
  3102. host: 'stackoverflow.com',
  3103. functionStart: function() {if (location.pathname.indexOf('/questions') > -1) {
  3104. curSite = DBSite.stackoverflow;
  3105. } else if (location.pathname === '/search') {
  3106. curSite = DBSite.stackoverflow_search;
  3107. } else if (location.pathname === '/tags') {
  3108. curSite = DBSite.stackoverflow_tags;
  3109. } else if (location.pathname === '/users') {
  3110. curSite = DBSite.stackoverflow_users;
  3111. }},
  3112. pager: {
  3113. type: 1,
  3114. nextLink: 'css;a[href][rel="next"]',
  3115. pageElement: 'css;#questions > div',
  3116. insertPosition: ['css;#questions', 3],
  3117. replaceE: 'css;.pager',
  3118. scrollDelta: 1500
  3119. }
  3120. }, // StackOverflow - Questions
  3121. stackoverflow_tags: {
  3122. SiteTypeID: 0,
  3123. pager: {
  3124. type: 1,
  3125. nextLink: 'css;a[href][rel="next"]',
  3126. pageElement: 'css;#tags-browser > div',
  3127. insertPosition: ['css;#tags-browser', 3],
  3128. replaceE: 'css;.pager',
  3129. scrollDelta: 1500
  3130. }
  3131. }, // StackOverflow - Tags
  3132. stackoverflow_users: {
  3133. SiteTypeID: 0,
  3134. pager: {
  3135. type: 1,
  3136. nextLink: 'css;a[href][rel="next"]',
  3137. pageElement: 'css;#user-browser > div:first-child > div',
  3138. insertPosition: ['css;#user-browser > div:first-child', 3],
  3139. replaceE: 'css;.pager',
  3140. scrollDelta: 1500
  3141. }
  3142. }, // StackOverflow - Users
  3143. stackoverflow_search: {
  3144. SiteTypeID: 0,
  3145. pager: {
  3146. type: 1,
  3147. nextLink: 'css;a[href][rel="next"]',
  3148. pageElement: 'css;.js-search-results > div:first-child > div',
  3149. insertPosition: ['css;.js-search-results > div:first-child', 3],
  3150. replaceE: 'css;.pager',
  3151. scrollDelta: 1500
  3152. }
  3153. }, // StackOverflow - Search
  3154. segmentfault: {
  3155. SiteTypeID: 0,
  3156. host: 'segmentfault.com',
  3157. functionStart: function() {locationchange = true;
  3158. if (location.pathname.indexOf('/questions') > -1) {
  3159. curSite = DBSite.segmentfault;
  3160. } else if (location.pathname === '/search') {
  3161. curSite = DBSite.segmentfault_search;
  3162. }},
  3163. pager: {
  3164. type: 1,
  3165. nextLink: '//a[@class="page-link"][contains(text(), "下一页")]',
  3166. pageElement: 'css;ul.list-group > li',
  3167. insertPosition: ['css;ul.list-group', 3],
  3168. replaceE: 'css;ul.pagination',
  3169. scrollDelta: 1000
  3170. }
  3171. }, // SegmentFault - Questions
  3172. segmentfault_search: {
  3173. SiteTypeID: 0,
  3174. pager: {
  3175. type: 1,
  3176. nextLink: 'css;a[href][rel="next"]',
  3177. pageElement: 'css;.search-result > section',
  3178. insertPosition: ['css;.search-result > div:last-child', 1],
  3179. replaceE: 'css;ul.pagination',
  3180. scrollDelta: 1000
  3181. }
  3182. }, // SegmentFault - Search
  3183. libgen: {
  3184. SiteTypeID: 0,
  3185. host: /libgen/,
  3186. functionStart: function() {if (location.pathname === '/search.php') {curSite = DBSite.libgen;}},
  3187. pager: {
  3188. type: 1,
  3189. nextLink: '//font/a[@href][contains(text(), "►")]',
  3190. pageElement: 'css;table[rules="rows"] > tbody > tr:nth-of-type(n+2), .paginator+script:not([src])',
  3191. insertPosition: ['css;table[rules="rows"] > tbody', 3],
  3192. replaceE: '//td[./font/a[@href][contains(text(), "►")]]',
  3193. scriptType: 2,
  3194. history: true,
  3195. scrollDelta: 2000
  3196. }
  3197. }, // 学术
  3198. pubmed: {
  3199. SiteTypeID: 0,
  3200. host: 'pubmed.ncbi.nlm.nih.gov',
  3201. pager: {
  3202. type: 2,
  3203. nextLink: 'button.load-button.next-page',
  3204. nextText: 'Show more',
  3205. scrollDelta: 1500
  3206. }
  3207. }, // 学术
  3208. google_scholar: {
  3209. SiteTypeID: 0,
  3210. pager: {
  3211. type: 1,
  3212. nextLink: '//a[./span[@class="gs_ico gs_ico_nav_next"]]',
  3213. pageElement: 'css;#gs_res_ccl_mid > *',
  3214. insertPosition: ['css;#gs_res_ccl_mid', 3],
  3215. replaceE: 'id("gs_n")',
  3216. scriptType: 1,
  3217. scrollDelta: 2000
  3218. }
  3219. }, // 谷歌学术
  3220. bing_academic: {
  3221. SiteTypeID: 0,
  3222. pager: {
  3223. type: 1,
  3224. nextLink: 'css;a.sb_pagN[href]',
  3225. pageElement: 'css;#b_results > li.aca_algo',
  3226. insertPosition: ['css;#b_results .b_pag', 1],
  3227. replaceE: 'css;#b_results .b_pag',
  3228. scrollDelta: 1000
  3229. }
  3230. }, // 必应学术
  3231. baidu_xueshu: {
  3232. SiteTypeID: 0,
  3233. host: 'xueshu.baidu.com',
  3234. functionStart: function() {if (location.pathname === '/s') {
  3235. curSite = DBSite.baidu_xueshu;
  3236. } else if (location.pathname.indexOf('journal/navigation') > -1) {
  3237. curSite = DBSite.baidu_xueshu_journal;
  3238. } else if (location.pathname.indexOf('paper/show') > -1) {
  3239. curSite = DBSite.baidu_xueshu_paper;
  3240. }},
  3241. pager: {
  3242. type: 1,
  3243. nextLink: 'id("page")/a[./i[@class="c-icon-pager-next"]][@href]',
  3244. pageElement: 'css;#bdxs_result_lists > div.result',
  3245. insertPosition: ['css;#bdxs_result_lists', 3],
  3246. replaceE: 'css;#page',
  3247. history: true,
  3248. scrollDelta: 1000
  3249. }
  3250. }, // 百度学术
  3251. baidu_xueshu_journal: {
  3252. SiteTypeID: 0,
  3253. pager: {
  3254. type: 1,
  3255. nextLink: 'css;a.res-page-next[href]',
  3256. pageElement: 'css;#journaldetail > div',
  3257. insertPosition: ['css;#journaldetail', 3],
  3258. replaceE: 'css;.res-page',
  3259. history: true,
  3260. scrollDelta: 1000
  3261. }
  3262. }, // 百度学术
  3263. baidu_xueshu_paper: {
  3264. SiteTypeID: 0,
  3265. pager: {
  3266. type: 2,
  3267. nextLink: 'div:not([style*="display: none"]) > .more_btn',
  3268. nextText: '加载更多',
  3269. scrollDelta: 1000
  3270. }
  3271. }, // 百度学术
  3272. so_xueshu: {
  3273. SiteTypeID: 0,
  3274. host: 'xueshu.so.com',
  3275. functionStart: function() {if (location.pathname === '/s') {curSite = DBSite.so_xueshu;}},
  3276. pager: {
  3277. type: 1,
  3278. nextLink: 'css;a#snext[href]',
  3279. pageElement: 'css;ul.list > li',
  3280. insertPosition: ['css;ul.list', 3],
  3281. replaceE: 'css;#page',
  3282. scrollDelta: 1000
  3283. }
  3284. }, // 360 学术
  3285. wikihow: {
  3286. SiteTypeID: 0,
  3287. host: ['www.wikihow.com', 'zh.wikihow.com'],
  3288. functionStart: function() {if (location.pathname.indexOf('/Category:') > -1) {
  3289. curSite = DBSite.wikihow;
  3290. } else if (location.pathname.indexOf('/wikiHowTo') > -1 && location.search.indexOf('?search=') > -1) {
  3291. curSite = DBSite.wikihow_search;
  3292. }},
  3293. pager: {
  3294. type: 1,
  3295. nextLink: 'css;a.pag_next',
  3296. pageElement: 'css;#cat_all > .cat_grid > div',
  3297. insertPosition: ['css;#cat_all > .cat_grid', 3],
  3298. replaceE: 'css;#large_pagination',
  3299. scriptType: 4,
  3300. scrollDelta: 2000
  3301. }
  3302. }, // 指南
  3303. wikihow_search: {
  3304. SiteTypeID: 0,
  3305. pager: {
  3306. type: 1,
  3307. nextLink: 'css;#searchresults_footer > a.buttonright',
  3308. pageElement: 'css;#searchresults_list > a',
  3309. insertPosition: ['css;#searchresults_list', 3],
  3310. replaceE: 'css;#searchresults_footer',
  3311. scrollDelta: 3000
  3312. }
  3313. }, // 指南 - 搜索页
  3314. afreecatv: {
  3315. SiteTypeID: 0,
  3316. host: 'www.afreecatv.com',
  3317. pager: {
  3318. type: 2,
  3319. nextLink: '.btn-more > button',
  3320. intervals: 2000,
  3321. scrollDelta: 1000
  3322. }
  3323. }, // 直播
  3324. greasyfork: {
  3325. SiteTypeID: 0,
  3326. host: 'greasyfork.org',
  3327. functionStart: function() {if (/\/scripts$/.test(location.pathname) || location.pathname.indexOf('/scripts/by-site/') > -1) {
  3328. curSite = DBSite.greasyfork;
  3329. } else if (/\/feedback$/.test(location.pathname)) {
  3330. curSite = DBSite.greasyfork_feedback;
  3331. } else if (location.pathname.indexOf('/discussions') > -1 && !(/\/\d+/.test(location.pathname))) {
  3332. curSite = DBSite.greasyfork_discussions;
  3333. }},
  3334. pager: {
  3335. type: 1,
  3336. nextLink: '//a[@class="next_page"][@href]',
  3337. pageElement: 'css;ol#browse-script-list > li',
  3338. insertPosition: ['css;ol#browse-script-list', 3],
  3339. replaceE: 'css;.pagination',
  3340. scrollDelta: 1000
  3341. }
  3342. }, // 脚本
  3343. greasyfork_feedback: {
  3344. SiteTypeID: 0,
  3345. pager: {
  3346. type: 1,
  3347. nextLink: '//a[@class="next_page"][@href]',
  3348. pageElement: 'css;.script-discussion-list > div',
  3349. insertPosition: ['css;.script-discussion-list', 3],
  3350. replaceE: 'css;.pagination',
  3351. scrollDelta: 1500
  3352. }
  3353. }, // 脚本 - 反馈页
  3354. greasyfork_discussions: {
  3355. SiteTypeID: 0,
  3356. pager: {
  3357. type: 1,
  3358. nextLink: '//a[@class="next_page"][@href]',
  3359. pageElement: 'css;.discussion-list > div',
  3360. insertPosition: ['css;.discussion-list', 3],
  3361. replaceE: 'css;.pagination',
  3362. scrollDelta: 1000
  3363. }
  3364. }, // 脚本 - 讨论页
  3365. ruyile_xuexiao: {
  3366. SiteTypeID: 0,
  3367. host: 'www.ruyile.com',
  3368. functionStart: function() {
  3369. if (location.pathname === '/xuexiao/') {
  3370. curSite = DBSite.ruyile_xuexiao;
  3371. } else if (location.pathname === '/data/') {
  3372. curSite = DBSite.ruyile_data;
  3373. } else if (location.pathname === '/shijuan/') {
  3374. curSite = DBSite.ruyile_shijuan;
  3375. }},
  3376. pager: {
  3377. type: 1,
  3378. nextLink: '//div[@class="fy"]/a[contains(text(), "下一页")][@href]',
  3379. pageElement: 'css;.xxlb > .sk',
  3380. insertPosition: ['css;.xxlb', 3],
  3381. replaceE: 'css;.fy',
  3382. scrollDelta: 1000
  3383. }
  3384. }, // 如意了教育 - 学校
  3385. ruyile_data: {
  3386. SiteTypeID: 0,
  3387. pager: {
  3388. type: 1,
  3389. nextLink: '//div[@class="fy"]/a[contains(text(), "下一页")][@href]',
  3390. pageElement: 'css;.m1_z > .lbk',
  3391. insertPosition: ['css;.page', 1],
  3392. replaceE: 'css;.fy',
  3393. scrollDelta: 1000
  3394. }
  3395. }, // 如意了教育 - 数据
  3396. ruyile_shijuan: {
  3397. SiteTypeID: 0,
  3398. pager: {
  3399. type: 1,
  3400. nextLink: '//div[@class="fy"]/a[contains(text(), "下一页")][@href]',
  3401. pageElement: 'css;.m1_z > .m2_lb',
  3402. insertPosition: ['css;.page', 1],
  3403. replaceE: 'css;.fy',
  3404. scrollDelta: 1000
  3405. }
  3406. }, // 如意了教育 - 试卷
  3407. runoob: {
  3408. SiteTypeID: 0,
  3409. host: 'www.runoob.com',
  3410. functionStart: function() {if (location.pathname.split('/').length > 2) {
  3411. curSite = DBSite.runoob; document.body.appendChild(document.createElement('style')).textContent = '#comments, #postcomments, #respond, #footer {display: none !important;} .article-intro h1:not(:nth-of-type(1)) {margin: 30px 0 10px 0;}';
  3412. }},
  3413. pager: {
  3414. type: 1,
  3415. nextLink: function() { // 过滤部分非本页的参考手册
  3416. let next = document.querySelector('#leftcolumn > a[style]~a')
  3417. if (next.href.split('/').length === location.href.split('/').length && next.href.split('/')[3] === location.href.split('/')[3]) return next.href;
  3418. next.href = location.href; curSite = {SiteTypeID: 0}; return ''
  3419. },
  3420. pageElement: 'css;#content > *',
  3421. insertPosition: ['css;#content', 3],
  3422. replaceE: 'css;.previous-next-links, #leftcolumn, head > title',
  3423. history: true,
  3424. forceHTTPS: true,
  3425. scrollDelta: 1000
  3426. },
  3427. function: {
  3428. after: function() { // 左侧栏高亮当前页面标题
  3429. let title = document.title.split(' | '); if (title.length > 1) {title = title[0]; document.querySelectorAll('#leftcolumn > a').forEach(function(e){if (e.innerText === title) {e.style = 'background-color: rgb(150, 185, 125); font-weight: bold; color: rgb(255, 255, 255);';}})}
  3430. }
  3431. }
  3432. }, // 菜鸟教程
  3433. netbian: {
  3434. SiteTypeID: 0,
  3435. host: 'pic.netbian.com',
  3436. functionStart: function() {curSite = DBSite.netbian; document.lastElementChild.appendChild(document.createElement('style')).textContent = 'li.nextpage {display: none !important;}';},
  3437. pager: {
  3438. type: 1,
  3439. nextLink: '//div[@class="page"]/a[contains(text(),"下一页")]',
  3440. pageElement: 'css;.slist ul > li:not(.nextpage)',
  3441. insertPosition: ['css;.slist ul', 3],
  3442. replaceE: 'css;.page',
  3443. mimeType: 'text/html; charset=gbk',
  3444. scrollDelta: 1000
  3445. }
  3446. }, // 彼岸图网
  3447. ioliu: {
  3448. SiteTypeID: 0,
  3449. host: 'bing.ioliu.cn',
  3450. functionStart: function() {if (location.pathname.indexOf('/photo/') === -1 && location.pathname.indexOf('.html') === -1) {curSite = DBSite.ioliu; document.head.appendChild(document.createElement('base')).target = '_blank'; document.lastElementChild.appendChild(document.createElement('style')).textContent = '.progressive--not-loaded {filter: none !important;}';}},
  3451. pager: {
  3452. type: 1,
  3453. nextLink: '//div[@class="page"]/a[@href][contains(text(), "下一页")]',
  3454. pageElement: 'css;body > .container > div.item',
  3455. insertPosition: ['css;body > .container', 3],
  3456. replaceE: 'css;.page',
  3457. scrollDelta: 1000
  3458. }
  3459. }, // 必应壁纸
  3460. nastol: {
  3461. SiteTypeID: 0,
  3462. host: 'www.nastol.com.ua',
  3463. pager: {
  3464. type: 1,
  3465. nextLink: '//a[./span[@class="nav-next"]]',
  3466. pageElement: 'css;#dle-content > div',
  3467. insertPosition: ['css;#dle-content > noindex', 1],
  3468. replaceE: 'css;.navigation',
  3469. mimeType: 'text/html; charset=windows-1251',
  3470. scrollDelta: 1000
  3471. }
  3472. }, // 壁纸
  3473. hdqwalls: {
  3474. SiteTypeID: 0,
  3475. host: 'hdqwalls.com',
  3476. pager: {
  3477. type: 1,
  3478. nextLink: 'css;a#next',
  3479. pageElement: 'css;.wallpapers_container > div.wall-resp',
  3480. insertPosition: ['css;div.pagination_container, .wallpapers_container > div.wall-resp+div:not(.wall-resp)', 1],
  3481. replaceE: 'css;ul.pagination',
  3482. scrollDelta: 1000
  3483. }
  3484. }, // 壁纸
  3485. zhutix: {
  3486. SiteTypeID: 0,
  3487. host: 'zhutix.com',
  3488. functionStart: function() {if (document.getElementById('primary-home')) {
  3489. curSite = DBSite.zhutix_postlist;
  3490. } else {
  3491. curSite = DBSite.zhutix;
  3492. }},
  3493. pager: {
  3494. type: 1,
  3495. nextLink: '//li[@class="next-page"]/a | //div[@class="btn-pager"]/a[contains(text(), "❯")]',
  3496. pageElement: 'css;#post-list > ul > li',
  3497. insertPosition: ['css;#post-list > ul', 3],
  3498. replaceE: 'css;.pagination, .b2-pagenav.post-nav',
  3499. scrollDelta: 1500
  3500. }
  3501. }, // 致美化
  3502. zhutix_postlist: {
  3503. SiteTypeID: 0,
  3504. pager: {
  3505. type: 1,
  3506. nextLink: '//li[@class="next-page"]/a',
  3507. pageElement: 'css;#primary-home > div:not(.pagination)',
  3508. insertPosition: ['css;.pagination', 1],
  3509. replaceE: 'css;.pagination',
  3510. scrollDelta: 1500
  3511. }
  3512. } // 致美化 - 文章列表
  3513. };
  3514. // 生成 SiteTypeID
  3515. generateID();
  3516. // 用于脚本判断(针对部分特殊的网站)
  3517. SiteType = {
  3518. BAIDU_TIEBA: DBSite.baidu_tieba.SiteTypeID,
  3519. GAMERSKY_GL: DBSite.gamersky_gl.SiteTypeID
  3520. };
  3521. }
  3522.  
  3523.  
  3524. if (webType != 1) {
  3525. // < 所有 Discuz!论坛 >
  3526. if (webType === 2) {
  3527. if (location.pathname.indexOf('.html') > -1) { // 判断是不是静态网页(.html 结尾)
  3528. if (location.pathname.indexOf('/forum-') > -1) { // < 各版块帖子列表 >
  3529. if (document.getElementById('autopbn')) { // 判断是否有 [下一页] 按钮
  3530. curSite = DBSite.discuz_forum;
  3531. } else if (document.getElementById('waterfall')) { // 判断是否为图片模式
  3532. curSite = DBSite.discuz_waterfall; waterfallStyle(); // 图片模式列表样式预处理
  3533. } else {
  3534. curSite = DBSite.discuz_guide;
  3535. }
  3536. } else if (location.pathname.indexOf('/thread-') > -1) { // < 帖子内 >
  3537. if (GM_getValue('menu_discuz_thread_page')) {
  3538. curSite = DBSite.discuz_thread;
  3539. hidePgbtn(); // 隐藏帖子内的 [下一页] 按钮
  3540. }
  3541. } else if(location.pathname.indexOf('search') > -1) { // < 搜索结果 >
  3542. curSite = DBSite.discuz_search;
  3543. }
  3544. }
  3545. // 如果没有匹配的则继续
  3546. if (curSite.SiteTypeID === 0) {
  3547. if (location.search.indexOf('mod=forumdisplay') > -1 || location.pathname.indexOf('forumdisplay.php') > -1) { // < 各版块帖子列表 >
  3548. if (document.getElementById('autopbn')) { // 判断是否有 [下一页] 按钮
  3549. curSite = DBSite.discuz_forum;
  3550. } else if (document.getElementById('waterfall')) { // 判断是否为图片模式
  3551. curSite = DBSite.discuz_waterfall; waterfallStyle(); // 图片模式列表样式预处理
  3552. } else {
  3553. curSite = DBSite.discuz_guide;
  3554. }
  3555. } else if (location.search.indexOf('mod=viewthread') > -1 || location.pathname.indexOf('viewthread.php') > -1) { // < 帖子内 >
  3556. if (GM_getValue('menu_discuz_thread_page')) {
  3557. curSite = DBSite.discuz_thread;
  3558. hidePgbtn(); // 隐藏帖子内的 [下一页] 按钮
  3559. }
  3560. } else if (location.search.indexOf('mod=guide') > -1) { // < 导读帖子列表 >
  3561. curSite = DBSite.discuz_guide;
  3562. } else if(location.search.indexOf('mod=space') > -1 && location.search.indexOf('&view=me') > -1) { // 别人的主题/回复
  3563. curSite = DBSite.discuz_youspace;
  3564. } else if (location.search.indexOf('mod=collection') > -1) { // < 淘贴列表 >
  3565. curSite = DBSite.discuz_collection;
  3566. } else if (location.pathname.indexOf('search') > -1) { // < 搜索结果 >
  3567. curSite = DBSite.discuz_search;
  3568. } else if (document.getElementById('threadlist')) { // < 部分论坛的各板块 URL 是自定义的 >
  3569. curSite = DBSite.discuz_forum;
  3570. } else if (document.getElementById('postlist')) { // < 部分论坛的帖子内 URL 是自定义的 >
  3571. if (GM_getValue('menu_discuz_thread_page')) {
  3572. curSite = DBSite.discuz_thread;
  3573. hidePgbtn(); // 隐藏帖子内的 [下一页] 按钮
  3574. }
  3575. }
  3576. }
  3577. // < 所有 Flarum 论坛 >
  3578. } else if (webType === 3) {
  3579. DBSite.flarum.functionStart()
  3580. // < 所有使用 WordPress DUX 主题的网站 >
  3581. } else if (webType === 4) {
  3582. if (location.pathname.indexOf('.html') === -1) curSite = DBSite.dux;
  3583. if (location.host === 'apphot.cc') curSite.pager.scrollDelta = 2500; // 对于速度慢的网站,需要增加翻页敏感度
  3584. }
  3585. }
  3586.  
  3587. if (GM_getValue('menu_page_number')) {pageNumber('add');} else {pageNumber('set');} // 显示页码
  3588. pausePageEvent(); // 左键双击网页空白处暂停翻页
  3589.  
  3590. if (locationchange) { // 对于使用 pjax 技术的网站,需要监听 URL 变化来重新判断翻页规则
  3591. nowLocation = location.href
  3592. addLocationchange(); // 自定义 locationchange 事件
  3593. if (webType === 1) {
  3594. window.addEventListener('locationchange', function(){
  3595. if (nowLocation != location.href) {
  3596. nowLocation = location.href; curSite = {SiteTypeID: 0}; pageNum.now = 1; // 重置规则+页码
  3597. registerMenuCommand(); // 重新判断规则
  3598. curSite.pageUrl = ''; // 下一页URL
  3599. pageLoading(); // 自动无缝翻页
  3600.  
  3601. if (GM_getValue('menu_page_number')) {pageNumber('add');} else {pageNumber('set');} // 显示页码
  3602. pausePageEvent(); // 左键双击网页空白处暂停翻页
  3603. }
  3604. })
  3605. } else if (webType === 3) {
  3606. window.addEventListener('locationchange', function(){
  3607. if (nowLocation != location.href) {
  3608. nowLocation = location.href; curSite = {SiteTypeID: 0}; pageNum.now = 1; // 重置规则+页码
  3609. DBSite.flarum.functionStart(); // 重新判断规则
  3610. pageLoading(); // 自动无缝翻页
  3611.  
  3612. if (GM_getValue('menu_page_number')) {pageNumber('add');} else {pageNumber('set');} // 显示页码
  3613. pausePageEvent(); // 左键双击网页空白处暂停翻页
  3614. }
  3615. })
  3616. }
  3617. }
  3618.  
  3619. curSite.pageUrl = ''; // 下一页URL
  3620. //console.log(curSite);
  3621. pageLoading(); // 自动无缝翻页
  3622.  
  3623.  
  3624. // [Discuz! 论坛] 隐藏帖子内的 [下一页] 按钮
  3625. function hidePgbtn() {
  3626. document.lastElementChild.appendChild(document.createElement('style')).textContent = '.pgbtn {display: none;}';
  3627. }
  3628. // [Discuz! 论坛] 图片模式列表样式预处理
  3629. function waterfallStyle() {
  3630. let width = document.querySelector('#waterfall > li:first-child').style.width;
  3631. document.lastElementChild.appendChild(document.createElement('style')).textContent = `#waterfall {height: auto !important; width: 100% !important;} #waterfall > li {width: ${width} !important; float: left !important; position: inherit !important; left: auto !important; top: auto !important;}`;
  3632. }
  3633.  
  3634.  
  3635. // 通用型插入前函数(加载图片)
  3636. function src_functionBefore(pageElems, css) {
  3637. pageElems.forEach(function (one) {
  3638. if (css[0] == 0) { // src 图片
  3639. one.querySelectorAll(css[1]).forEach(function (now) {
  3640. now.src = now.getAttribute(css[2]);
  3641. });
  3642. } else if (css[0] == 1) { // 背景图片
  3643. one.querySelectorAll(css[1]).forEach(function (now) {
  3644. now.style.backgroundImage = 'url("' + now.getAttribute(css[2]) + '")';
  3645. });
  3646. }
  3647. });
  3648. return pageElems
  3649. }
  3650.  
  3651.  
  3652. // [头条搜索] 的插入前函数(过滤相关搜索)
  3653. function toutiao_functionBefore(pageElems) {
  3654. for (let i = 0; i < pageElems.length; i++) {
  3655. let now = pageElems[i].querySelector('div[class*="-header"]')
  3656. if (now && now.textContent === '相关搜索') {
  3657. pageElems.splice(i,1)
  3658. }
  3659. }
  3660. return pageElems
  3661. }
  3662.  
  3663.  
  3664. // [Startpage] 获取下一页地址
  3665. function startpage_functionNext() {
  3666. let form = getElementByXpath('//div[contains(@class, "pagination ")]/form[./button[@class="pagination__next-prev-button next"]]');
  3667. if (form) {
  3668. let action = form.action, value = ''; // 获取提交表单 URL
  3669. form.querySelectorAll('input[name]').forEach(function(input) {value += input.name + '=' + input.value + '&';}) // 生成表单参数
  3670. value = encodeURI(value.replace(/&$/,'')); // 清理最后一个 & 符号,并替换页码
  3671. if (action && value) return (action + '?' + value)
  3672. }
  3673. return '';
  3674. }
  3675.  
  3676.  
  3677. // [百度贴吧](发帖按钮点击事件)
  3678. function baidu_tieba_1() {
  3679. let button = document.querySelector('.tbui_aside_fbar_button.tbui_fbar_post > a');
  3680. if (button) {
  3681. button.remove();
  3682. document.querySelector('li.tbui_aside_fbar_button.tbui_fbar_down').insertAdjacentHTML(addTo(4), '<li class="tbui_aside_fbar_button tbui_fbar_post"><a href="javascript:void(0);" title="因为 [自动无缝翻页] 的原因,请点击该按钮发帖!"></a></li>')
  3683. button = document.querySelector('.tbui_aside_fbar_button.tbui_fbar_post > a');
  3684. if (button) {
  3685. button.onclick = function(){
  3686. let button2 = document.querySelector('div.edui-btn.edui-btn-fullscreen.edui-btn-name-portrait');
  3687. if (button2) {
  3688. button2.click();
  3689. } else {
  3690. alert('提示:登录后才能发帖!');
  3691. }
  3692. return false;
  3693. }
  3694. }
  3695. }
  3696. }
  3697. // [百度贴吧] 的插入前函数(加载图片)
  3698. function baidu_tieba_functionBefore(pageElems) {
  3699. pageElems.forEach(function (one) {
  3700. one.querySelectorAll('img.threadlist_pic[data-original]').forEach(function (now) {
  3701. now.src = now.dataset.original;
  3702. now.style.display = 'inline';
  3703. })
  3704. });
  3705. return pageElems
  3706. }
  3707. // [百度贴吧] 获取下一页地址
  3708. function baidu_tieba_functionNext() {
  3709. let next = document.querySelector('a.next.pagination-item[href]');
  3710. if (next != null && next.nodeType === 1 && next.href && next.href.slice(0,4) === 'http') {
  3711. var url = next.href + '&pagelets=frs-list%2Fpagelet%2Fthread&pagelets_stamp=' + new Date().getTime();
  3712. if (url === curSite.pageUrl) return
  3713. curSite.pageUrl = url;
  3714. getPageElems(curSite.pageUrl);
  3715. };
  3716. }
  3717. // [百度贴吧] 插入数据
  3718. function baidu_tieba_insertElement(newBody, type) {
  3719. if (!newBody) return
  3720. let pageElems = getAllElements(curSite.pager.pageElement, newBody, newBody),
  3721. toElement = getAllElements(curSite.pager.insertPosition[0])[0];
  3722. if (pageElems.length >= 0) {
  3723. // 执行插入前函数
  3724. pageElems = curSite.function.before(pageElems);
  3725. // 插入位置
  3726. let addTo1 = addTo(curSite.pager.insertPosition[1]);
  3727. // 获取 <script> 内容
  3728. const scriptElems = getAllElements('//script', newBody, newBody);
  3729. let scriptText = '';
  3730. for (let i = 0; i < scriptElems.length; i++) {
  3731. if (scriptElems[i].textContent.indexOf('Bigpipe.register("frs-list/pagelet/thread_list"') > -1) {
  3732. scriptText = scriptElems[i].textContent.replace('Bigpipe.register("frs-list/pagelet/thread_list", ','');
  3733. break
  3734. }
  3735. }
  3736. if (scriptText) {
  3737. scriptText = scriptText.slice(0, scriptText.indexOf(').')) // 获取主体内容
  3738. let scriptJSON = JSON.parse(scriptText).content; // 字符串转 JSON
  3739. var temp_baidu_tieba = document.createElement('div'); temp_baidu_tieba.innerHTML = scriptJSON; // 字符串转 Element 元素
  3740. pageElems = curSite.function.before(getAllElements(curSite.pager.pageElement, temp_baidu_tieba, temp_baidu_tieba)); // 插入前执行函数
  3741. pageElems.forEach(function (one) {toElement.insertAdjacentElement(addTo1, one);}); // 插入元素
  3742. // 当前页码 + 1
  3743. pageNum.now = pageNum._now + 1
  3744. // 替换元素
  3745. let oriE = document.querySelectorAll(curSite.pager.pageElement.replace('css;', '')),
  3746. repE = getAllElements(curSite.pager.replaceE, temp_baidu_tieba, temp_baidu_tieba);
  3747. if (oriE.length === repE.length) {
  3748. for (let i = 0; i < oriE.length; i++) {
  3749. oriE[i].outerHTML = repE[i].outerHTML;
  3750. }
  3751. }
  3752. }
  3753. }
  3754. }
  3755.  
  3756.  
  3757. // [NGA(玩家社区)] 的插入后函数(加载各版块帖子列表样式)
  3758. function nga_thread_functionAfter() {
  3759. document.body.appendChild(document.createElement('script')).textContent = 'commonui.topicArg.loadAll();';
  3760. }
  3761.  
  3762.  
  3763. // [V2EX] 的插入后函数(新标签页打开链接)
  3764. function v2ex_functionAfter(css) {
  3765. let links = document.querySelectorAll(css);if (!links) return
  3766. links.forEach(function (_this) {_this.target = '_blank';});
  3767. }
  3768.  
  3769.  
  3770. // [龙的天空] 获取下一页地址
  3771. function lkong_functionNext() {
  3772. let next = document.querySelector('li.ant-pagination-next'), page;
  3773. if (next && next.getAttribute('aria-disabled') === 'false') {
  3774. page = document.querySelector('li.ant-pagination-item-active[title]');
  3775. if (page && page.title) {
  3776. if (curSite.pager.intervals) {
  3777. let _SiteTypeID = curSite.SiteTypeID; curSite.SiteTypeID = 0;
  3778. setTimeout(function(){curSite.SiteTypeID = _SiteTypeID;}, curSite.pager.intervals)
  3779. }
  3780. return (location.origin + location.pathname + '?page=' + ++page.title);
  3781. }
  3782. }
  3783. return '';
  3784. }
  3785.  
  3786.  
  3787. // [3DM MOD] 获取下一页地址
  3788. function _3dmgame_mod_functionNext() {
  3789. let nextNum = getElementByXpath('//li[@class="page-list active"]/following-sibling::li[contains(@class, "page-list")]/a');
  3790. var url = '';
  3791. if (nextNum && nextNum.textContent) {
  3792. nextNum = 'Page=' + nextNum.textContent;
  3793. if (location.search) {
  3794. let search = location.search.replace(/(&)?Page=\d+(&)?/, '');
  3795. if (search === '?') {
  3796. url += location.origin + location.pathname + search + nextNum;
  3797. } else {
  3798. url += location.origin + location.pathname + search + '&' + nextNum;
  3799. }
  3800. } else {
  3801. url += location.origin + location.pathname + '?' + nextNum;
  3802. }
  3803. }
  3804. //console.log(url)
  3805. return url
  3806. }
  3807.  
  3808.  
  3809. // [游民星空-攻略] 的插入前函数(移除下一页底部的 "更多相关内容请关注:xxx" 文字)
  3810. function gamersky_gl_functionBefore(pageElems) {
  3811. pageElems.forEach(function (one) {
  3812. if (one.tagName === 'P' && one.textContent.indexOf('更多相关内容请关注') > -1) {one.style.display = 'none';}
  3813. });
  3814. return pageElems
  3815. }
  3816.  
  3817.  
  3818. // [NexusMods] 获取下一页地址
  3819. function nexusmods_functionNext() {
  3820. if (document.querySelector('.nexus-ui-blocker')) return
  3821. let modList;
  3822. if (location.pathname.indexOf('/news') > -1) {modList = RH_NewsTabContent;} else {modList = RH_ModList;}
  3823. let out_items = JSON.stringify(modList.out_items).replace(/{|}|"/g,''),
  3824. nextNum = getElementByXpath('//div[contains(@class, "pagenav")][1]//a[contains(@class, "page-selected")]/parent::li/following-sibling::li/a'),
  3825. categories = modList.out_items.categories, categoriesUrl = '';
  3826. var url = '';
  3827. if (nextNum && nextNum.innerText) {
  3828. nextNum = nextNum.innerText;
  3829. if (out_items.indexOf('page:') > -1) {
  3830. out_items = out_items.replace(/page:\d+/, `page:${nextNum}`)
  3831. } else {
  3832. out_items += `,page:${nextNum}`;
  3833. }
  3834. if (categories && categories != []) {
  3835. for (let i = 0; i < categories.length; i++) {
  3836. categoriesUrl += `,categories[]:${categories[i]}`
  3837. }
  3838. categoriesUrl = categoriesUrl.replace(/,/,'');
  3839. if (out_items.indexOf('categories:') > -1) {
  3840. out_items = out_items.replace(/categories:\[.*\]/, categoriesUrl)
  3841. }
  3842. }
  3843. url = `https://www.nexusmods.com${modList.uri}?RH_${modList.id}=${out_items}`
  3844. //console.log(nextNum, url, curSite.pageUrl, out_items)
  3845. if (url === curSite.pageUrl) return
  3846. curSite.pageUrl = url;
  3847. //console.log(nextNum, curSite.pageUrl, out_items)
  3848. getPageElems(curSite.pageUrl)
  3849. }
  3850. }
  3851. // [NexusMods] 插入数据
  3852. function nexusmods_insertElement(newBody, type) {
  3853. if (!newBody) return
  3854. let pageElems = getAllElements(curSite.pager.pageElement, newBody, newBody), // 主体元素
  3855. toElement = getAllElements(curSite.pager.insertPosition[0])[0], // 插入位置的元素
  3856. addTo1 = addTo(curSite.pager.insertPosition[1]); // 插入位置
  3857. // 添加下载数据
  3858. pageElems.forEach(function (one) {
  3859. let now = one.querySelector('.mod-tile-left');
  3860. if (now) {
  3861. let downloadCount = now.querySelector('.downloadcount > span.flex-label');
  3862. if (downloadCount) {
  3863. //console.log(now.dataset.gameId, now.dataset.modId)
  3864. if (GlobalModStats[now.dataset.gameId] && GlobalModStats[now.dataset.gameId][now.dataset.modId]) {
  3865. downloadCount.textContent = shortFormat(parseInt(GlobalModStats[now.dataset.gameId][now.dataset.modId].total));
  3866. }
  3867. }
  3868. }
  3869. });
  3870. // 插入网页
  3871. pageElems.forEach(function (one) {toElement.insertAdjacentElement(addTo1, one);});
  3872. // 当前页码 + 1
  3873. pageNum.now = pageNum._now + 1
  3874. // 替换元素
  3875. let oriE = document.querySelectorAll(curSite.pager.replaceE.replace('css;', '')),
  3876. repE = getAllElements(curSite.pager.replaceE, newBody, newBody);
  3877. if (oriE.length === repE.length) {
  3878. for (let i = 0; i < oriE.length; i++) {
  3879. oriE[i].outerHTML = repE[i].outerHTML;
  3880. }
  3881. }
  3882. }
  3883.  
  3884.  
  3885. // [cs_rin_ru] 各版块帖子列表的插入前函数(过滤置顶帖子)
  3886. function cs_rin_ru_functionBefore(pageElems) {
  3887. for (let i = 0; i < pageElems.length; i++) {
  3888. if (pageElems[i].textContent.replace(/\n| /g,'') === 'Topics') {
  3889. pageElems.splice(0,i+1);
  3890. break;
  3891. }
  3892. }
  3893. return pageElems
  3894. }
  3895.  
  3896. // [SkrBT] 获取下一页地址
  3897. function skrbt_functionNext() {
  3898. let page = document.querySelector('a[onclick][aria-label="Next"]');
  3899. if (page) {page = /(?<=\()\d+(?=\))/.exec(page.onclick)[0];} else {return '';} // 获取下一页页码
  3900. if (page) {
  3901. let action = document.getElementById('search-form').action, value = ''; // 获取提交表单 URL
  3902. document.querySelectorAll('#search-form input[name]').forEach(function(input) {value += input.name + '=' + input.value + '&';}) // 生成表单参数
  3903. value = encodeURI(value.replace(/&$/,'').replace(/p=\d+/,'p=' + page)); // 清理最后一个 & 符号,并替换页码
  3904. if (action && value) return (action + '?' + value)
  3905. }
  3906. return '';
  3907. }
  3908.  
  3909.  
  3910. // [BTHaha] 的插入前函数(隐藏底部元素)
  3911. function bthaha_functionBefore(pageElems) {
  3912. pageElems.forEach(function (one) {
  3913. let now = one.querySelector('[id^="list_top"], [id^="list_bottom"]')
  3914. if (now) {one.hidden = true;}
  3915. });
  3916. return pageElems
  3917. }
  3918.  
  3919.  
  3920. // [射手网] 获取下一页地址
  3921. function assrt_functionNext() {
  3922. let nextXPAHT = '//a[@id="pl-nav"][@href][contains(text(), ">")]'
  3923. let url = getElementByXpath(nextXPAHT);
  3924. if (url) {
  3925. url = /(?<=\()\d+(?=,)/.exec(url.href)[0]
  3926. if (url) {
  3927. return (location.origin + location.pathname + location.search.replace(/(&)?page=\d+$/,'') + '&page=' + url);
  3928. }
  3929. }
  3930. return '';
  3931. }
  3932.  
  3933.  
  3934. // [LRepacks] 的插入前函数(调整 class)
  3935. function lrepacks_functionBefore(pageElems) {
  3936. pageElems.forEach(function (one) {
  3937. let now = one.querySelector('.slideUp, .elementFade')
  3938. if (now) {
  3939. now.className = now.className.replace('slideUp','slideUpRun').replace('elementFade','elementFadeRun');
  3940. }
  3941. });
  3942. return pageElems
  3943. }
  3944.  
  3945.  
  3946. // [漫画狂] 获取下一页地址
  3947. function cartoonmad_functionNext() {
  3948. let nextXPAHT = '//a[@class="pages"][contains(text(),"下一頁")]',
  3949. nextPXPATH = '//a[@class="pages"][contains(string(),"下一話")]'
  3950. let url = getElementByXpath(nextXPAHT);
  3951. if (url) {
  3952. if (url.getAttribute('href') === 'thend.asp') {
  3953. url = getElementByXpath(nextPXPATH)
  3954. if (url) return url.href;
  3955. pausePage = false;
  3956. GM_notification({text: `注意:该网站早期漫画(如海贼王、柯南)因为网站自身问题而无法翻至下一话(仅限于显示为 [第 X 卷]/[下一卷] 的)。\n因此需要手动去 [目录页] 进入下一卷!`, timeout: 10000});
  3957. } else {
  3958. return url.href;
  3959. }
  3960. }
  3961. return '';
  3962. }
  3963.  
  3964.  
  3965. // [漫画猫] 初始化(显示本话所以图片)
  3966. function manhuacat_init() {
  3967. let _img = '';
  3968. for (let now of img_data_arr) {
  3969. _img += `<img src="${asset_domain}${img_pre}${now}">`;
  3970. }
  3971. document.querySelector('.img-content > img').remove();
  3972. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  3973.  
  3974. }
  3975. // [漫画猫] 获取下一页地址
  3976. function manhuacat_functionNext(pageElems, type) {
  3977. if (type === 'url') {
  3978. if(pageElems.code == '0000') {
  3979. if (pageElems.url === curSite.pageUrl) return
  3980. curSite.pageUrl = pageElems.url;
  3981. getPageElems(curSite.pageUrl); // 真正的下一页链接
  3982. }
  3983. } else {
  3984. let vg_r_data = document.querySelector('.vg-r-data');
  3985. if (vg_r_data) {
  3986. getPageElems(`https://${location.host}/chapter_num?chapter_id=${vg_r_data.dataset.chapter_num}&ctype=1&type=${vg_r_data.dataset.chapterType};`, 'json', 'GET', '', 'url');
  3987. }
  3988. }
  3989. }
  3990. // [漫画猫] 插入数据
  3991. function manhuacat_insertElement(pageElems, type) {
  3992. if (!pageElems) return
  3993. if (type === 'url') { // 获取下一页链接
  3994. manhuacat_functionNext(pageElems, type); return
  3995. }
  3996.  
  3997. // 添加历史记录
  3998. window.history.pushState(`{title: ${document.title}, url: ${location.href}}`, pageElems.querySelector('title').textContent, curSite.pageUrl);
  3999.  
  4000. // 替换元素
  4001. let oriE = document.querySelectorAll(curSite.pager.replaceE.replace('css;', '')),
  4002. repE = getAllElements(curSite.pager.replaceE, pageElems, pageElems);
  4003. if (oriE.length === repE.length) {
  4004. for (let i = 0; i < oriE.length; i++) {
  4005. oriE[i].outerHTML = repE[i].outerHTML;
  4006. }
  4007. }
  4008.  
  4009. // 插入图片
  4010. let _img = '', _img_arr = LZString.decompressFromBase64(getElementByXpath('//body/script[not(@src)][contains(text(), "img_data")]').textContent.split('"')[1]).split(','), vg_r_data = document.querySelector('.vg-r-data');;
  4011. for (let now of _img_arr) {
  4012. _img += `<img src="${vg_r_data.dataset.chapterDomain}${img_pre}${now}">`;
  4013. }
  4014. if (_img) {
  4015. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  4016. // 当前页码 + 1
  4017. pageNum.now = pageNum._now + 1
  4018. }
  4019. }
  4020.  
  4021.  
  4022. // [漫画DB] 初始化(将本话其余图片插入网页中)
  4023. function manhuadb_init() {
  4024. let _img = '',
  4025. data = document.querySelector('.vg-r-data'), imgDate;
  4026. if (!data) return
  4027. document.querySelectorAll(curSite.pager.pageElement.replace('css;', '')).forEach(function (one) {
  4028. if (one.tagName === 'SCRIPT' && one.textContent.indexOf('var img_data =') > -1) {
  4029. let json = JSON.parse(window.atob(one.textContent.split("'")[1]));
  4030. if (json) {
  4031. let _img = '';
  4032. for (let i = 0; i < json.length; i++) { // 遍历图片文件名数组,组合为 img 标签
  4033. let src = data.dataset.host + data.dataset.img_pre + json[i].img;
  4034. _img += `<img class="img-fluid show-pic" src="${src}">`
  4035. }
  4036. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  4037. }
  4038. }
  4039. })
  4040. }
  4041. // [漫画DB] 获取下一页地址
  4042. function manhuadb_functionNext() {
  4043. let nextArr = document.querySelectorAll('a.fixed-a-es'), next;
  4044. var url = '';
  4045. if (nextArr.length == 0) return
  4046. for (let i = 0; i < nextArr.length; i++) {
  4047. if (nextArr[i].className.indexOf('active') > -1) {
  4048. if (nextArr[i+1]) url = nextArr[i+1].href;
  4049. break;
  4050. }
  4051. }
  4052. if (url === curSite.pageUrl) return
  4053. curSite.pageUrl = url
  4054. getPageElems(curSite.pageUrl);
  4055. }
  4056. // [漫画DB] 插入数据
  4057. function manhuadb_insertElement(pageElems, type) {
  4058. if (!pageElems) return
  4059. let oriE = document.querySelectorAll(curSite.pager.pageElement.replace('css;', '')),
  4060. repE = getAllElements(curSite.pager.pageElement, pageElems, pageElems);
  4061. if (oriE.length === repE.length) {
  4062. for (let i = 0; i < oriE.length; i++) {
  4063. oriE[i].outerHTML = repE[i].outerHTML;
  4064. }
  4065. // 当前页码 + 1
  4066. pageNum.now = pageNum._now + 1
  4067. manhuadb_init(); // 将刚刚替换的图片插入网页中
  4068. }
  4069. }
  4070.  
  4071.  
  4072. // [HiComic(嗨漫画)] 初始化(将本话其余图片插入网页中)
  4073. function hicomic_init() {
  4074. let _img = '';
  4075. document.querySelectorAll('.chapter > section:not(:first-child) > section[val]').forEach(function (one) {
  4076. let src = one.getAttribute('val');
  4077. if (src.indexOf('!p_c_c_') === -1) src += '!p_c_c_h'
  4078. _img += `<img src="${src}">`
  4079. })
  4080. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  4081. window.document.title = window.document.title.replace(/(\(第.+\))? - HiComic/, `(${document.querySelector('.chapter_name').textContent}) - HiComic`); // 修改网页标题(加上 第 X 话)
  4082. }
  4083. // [HiComic(嗨漫画)] 获取下一页地址
  4084. function hicomic_functionNext() {
  4085. let nextId;
  4086. nextId = document.querySelector('.next_chapter:not(.end)')
  4087. if (nextId && nextId.id && nextId.id != 'None') {
  4088. curSite.pageUrl = location.href;
  4089. getPageElems(`https://www.hicomic.net/api/web/chapter/${nextId.id}/contents`, 'json');
  4090. }
  4091. }
  4092. // [HiComic(嗨漫画)] 插入数据
  4093. function hicomic_insertElement(pageElems, type) {
  4094. if (!pageElems || pageElems.code != 200) return
  4095. if (pageElems.results.chapter.next) { // 写入下一页的 UUID
  4096. document.querySelector('.next_chapter').id = pageElems.results.chapter.next;
  4097. } else {
  4098. document.querySelector('.next_chapter').id = 'None';
  4099. document.querySelector('.next_chapter').classList.add('end');
  4100. }
  4101. document.querySelector('.chapter_name').textContent = pageElems.results.chapter.name; // 修改漫画标题
  4102. let title = window.document.title.replace(/(\(第.+\))? - HiComic/, `(${pageElems.results.chapter.name}) - HiComic`)
  4103. window.history.pushState(`{title: ${document.title}, url: ${location.href}}`, title, curSite.pageUrl); // 添加历史记录
  4104. window.document.title = title; // 修改当前网页标题为下一话的标题
  4105. let _img = '';
  4106. for (let i = 0; i < pageElems.results.chapter.contents.length; i++) { // 遍历图片文件名数组,组合为 img 标签
  4107. let src = pageElems.results.chapter.contents[i].url;
  4108. if (src.indexOf('!p_c_c_') === -1) src += '!p_c_c_h';
  4109. _img += `<img src="${src}">`
  4110. }
  4111. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  4112. // 当前页码 + 1
  4113. pageNum.now = pageNum._now + 1
  4114. }
  4115.  
  4116.  
  4117. // [动漫之家] 初始化(调整本话其余图片)
  4118. function dmzj_init() {
  4119. let _img = '';
  4120. document.querySelectorAll('.comic_wraCon > a > img').forEach(function (one) {
  4121. _img += `<img src="${one.dataset.original}">`;
  4122. one.parentElement.remove();
  4123. })
  4124. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  4125.  
  4126. }
  4127. // [动漫之家] 获取下一页地址
  4128. function dmzj_functionNext() {
  4129. let next;
  4130. next = document.querySelector('span.next > a[href]')
  4131. if (next) {
  4132. if (next.href === curSite.pageUrl) return
  4133. curSite.pageUrl = next.href;
  4134. getPageElems(curSite.pageUrl);
  4135. }
  4136. }
  4137. // [动漫之家] 插入数据
  4138. function dmzj_insertElement(pageElems, type) {
  4139. if (!pageElems) return
  4140. // 插入并运行 <script>
  4141. let scriptElement = pageElems.querySelectorAll('head > script[type]:not([src])'), scriptText = '';
  4142. scriptElement.forEach(function (one) {scriptText += ';' + one.textContent;});
  4143. if (scriptText) document.body.appendChild(document.createElement('script')).textContent = scriptText;
  4144.  
  4145. // 插入图片
  4146. let _img = '', _img_arr;
  4147. if (pages.indexOf('|') === -1) {
  4148. _img_arr = JSON.parse(pages.replace(/\r\n/g,'|')).page_url.split('|');
  4149. } else {
  4150. _img_arr = JSON.parse(pages).page_url.split('|');
  4151. }
  4152. for (let now of _img_arr) {
  4153. _img += `<img src="${img_prefix}${now}">`;
  4154. }
  4155. if (_img) {
  4156. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  4157.  
  4158. // 添加历史记录
  4159. window.history.pushState(`{title: ${document.title}, url: ${location.href}}`, pageElems.querySelector('title').textContent, curSite.pageUrl);
  4160.  
  4161. // 替换元素
  4162. let oriE = document.querySelectorAll(curSite.pager.replaceE.replace('css;', '')),
  4163. repE = getAllElements(curSite.pager.replaceE, pageElems, pageElems);
  4164. if (oriE.length === repE.length) {
  4165. for (let i = 0; i < oriE.length; i++) {
  4166. oriE[i].outerHTML = repE[i].outerHTML;
  4167. }
  4168. // 当前页码 + 1
  4169. pageNum.now = pageNum._now + 1
  4170. }
  4171. }
  4172. }
  4173.  
  4174.  
  4175. // [动漫之家-漫画] 初始化(调整本话其余图片)
  4176. function dmzj_manhua_init() {
  4177. let _img = '';
  4178. document.querySelectorAll('#center_box > .inner_img img[src]').forEach(function (one) {
  4179. _img += `<img src="${one.dataset.original}">`;
  4180. one.parentElement.parentElement.remove();
  4181. })
  4182. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  4183.  
  4184. }
  4185. // [动漫之家-漫画] 获取下一页地址
  4186. function dmzj_manhua_functionNext() {
  4187. let next;
  4188. next = document.getElementById('next_chapter')
  4189. if (next) {
  4190. if (next.href === curSite.pageUrl) return
  4191. curSite.pageUrl = next.href;
  4192. getPageElems(curSite.pageUrl);
  4193. }
  4194. }
  4195. // [动漫之家-漫画] 插入数据
  4196. function dmzj_manhua_insertElement(pageElems, type) {
  4197. if (!pageElems) return
  4198. // 插入并运行 <script>
  4199. let scriptElement = pageElems.querySelectorAll('head > script[type]:not([src])'), scriptText = '';
  4200. scriptElement.forEach(function (one) {scriptText += ';' + one.textContent;});
  4201. if (scriptText) document.body.appendChild(document.createElement('script')).textContent = scriptText;
  4202.  
  4203. // 插入图片
  4204. let _img = '';
  4205. for (let now of arr_pages) {
  4206. _img += `<img src="${img_prefix}${now}">`;
  4207. }
  4208. if (_img) {
  4209. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  4210.  
  4211. // 添加历史记录
  4212. window.history.pushState(`{title: ${document.title}, url: ${location.href}}`, pageElems.querySelector('title').textContent, curSite.pageUrl);
  4213.  
  4214. // 替换元素
  4215. let oriE = document.querySelectorAll(curSite.pager.replaceE.replace('css;', '')),
  4216. repE = getAllElements(curSite.pager.replaceE, pageElems, pageElems);
  4217. if (oriE.length === repE.length) {
  4218. for (let i = 0; i < oriE.length; i++) {
  4219. oriE[i].outerHTML = repE[i].outerHTML;
  4220. }
  4221. // 当前页码 + 1
  4222. pageNum.now = pageNum._now + 1
  4223. }
  4224. }
  4225. }
  4226.  
  4227.  
  4228. // [拷贝漫画] 获取下一页地址
  4229. function copymanga_functionNext() {
  4230. let next;
  4231. next = document.querySelector('.comicContent-next > a[href]')
  4232. if (next) {
  4233. if (next.href === curSite.pageUrl) return
  4234. curSite.pageUrl = next.href;
  4235. getPageElems(curSite.pageUrl);
  4236. }
  4237. }
  4238. // [拷贝漫画] 插入数据
  4239. function copymanga_insertElement(pageElems, type) {
  4240. if (!pageElems) return
  4241. // 添加历史记录
  4242. window.history.pushState(`{title: ${document.title}, url: ${location.href}}`, pageElems.querySelector('title').textContent, curSite.pageUrl);
  4243. let oldImg = document.querySelector('.comicContent-image-list').innerHTML;
  4244.  
  4245. // 替换元素
  4246. let oriE = document.querySelectorAll(curSite.pager.replaceE.replace('css;', '')),
  4247. repE = getAllElements(curSite.pager.replaceE, pageElems, pageElems);
  4248. if (oriE.length === repE.length) {
  4249. for (let i = 0; i < oriE.length; i++) {
  4250. oriE[i].outerHTML = repE[i].outerHTML;
  4251. }
  4252. // 插入并运行 <script>
  4253. document.body.appendChild(document.createElement('script')).src = document.querySelector('body > script[async][src*="comic_content_pass"]').src;
  4254. setTimeout(function(){
  4255. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), oldImg); // 将 img 标签插入到网页中
  4256. }, 100);
  4257. // 当前页码 + 1
  4258. pageNum.now = pageNum._now + 1
  4259. }
  4260. }
  4261.  
  4262.  
  4263. // [漫画星球] 获取下一页地址
  4264. function mhxqiu_functionNext() {
  4265. let next = document.querySelector('#mainControlNext');
  4266. if (next) {
  4267. if (next.href === curSite.pageUrl) return
  4268. curSite.pageUrl = next.href;
  4269. getPageElems(curSite.pageUrl);
  4270. }
  4271. }
  4272. // [漫画星球] 插入数据
  4273. function mhxqiu_insertElement(pageElems, type) {
  4274. if (!pageElems) return
  4275. // 插入并运行 <script>
  4276. let scriptElement = getElementByXpath('//body/script[@type][not(@src)][contains(text(), "eval(")]', pageElems);
  4277. if (scriptElement) document.body.appendChild(document.createElement('script')).textContent = scriptElement.textContent;
  4278.  
  4279. // 插入图片
  4280. let _img = '';
  4281. for (let now of newImgs) {
  4282. _img += `<li style="margin:0 auto;"><div style="display: inline-block;zoom: 1;"><img src="${now}" class="loaded lazy" style="opacity: 1;box-shadow:none;"></div></li>`;
  4283. }
  4284. if (_img) {
  4285. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  4286.  
  4287. // 添加历史记录
  4288. window.history.pushState(`{title: ${document.title}, url: ${location.href}}`, pageElems.querySelector('title').textContent, curSite.pageUrl);
  4289.  
  4290. // 替换元素
  4291. let oriE = document.querySelectorAll(curSite.pager.replaceE.replace('css;', '')),
  4292. repE = getAllElements(curSite.pager.replaceE, pageElems, pageElems);
  4293. if (oriE.length === repE.length) {
  4294. for (let i = 0; i < oriE.length; i++) {
  4295. oriE[i].outerHTML = repE[i].outerHTML;
  4296. }
  4297. // 当前页码 + 1
  4298. pageNum.now = pageNum._now + 1
  4299. }
  4300. }
  4301. }
  4302.  
  4303.  
  4304. // [古风漫画网] 获取下一页地址
  4305. function gufengmh_functionNext() {
  4306. let pageElems = document.querySelector(curSite.pager.pageElement.replace('css;', '')); // 寻找数据所在元素
  4307. if (pageElems) {
  4308. let comicUrl, nextId;
  4309. var url = '';
  4310. pageElems.textContent.split(';').forEach(function (one){ // 分号 ; 分割为数组并遍历
  4311. //console.log(one)
  4312. if (one.indexOf('comicUrl') > -1) { // 下一页 URL 前半部分
  4313. comicUrl = one.split('"')[1];
  4314. } else if (one.indexOf('nextChapterData') > -1) { // 下一页 URL 的后半部分 ID
  4315. nextId = one.split('"id":')[1].split(',')[0];
  4316. }
  4317. })
  4318. if (comicUrl && nextId && nextId != 'null') { // 组合到一起就是下一页 URL
  4319. url = comicUrl + nextId + '.html'
  4320. if (url === curSite.pageUrl) return
  4321. curSite.pageUrl = url
  4322. getPageElems(curSite.pageUrl); // 访问下一页 URL 获取
  4323. }
  4324. }
  4325. }
  4326. // [古风漫画网] 插入数据
  4327. function gufengmh_insertElement(pageElems, type) {
  4328. if (pageElems) {
  4329. let url = curSite.pageUrl;
  4330. pageElems = getAllElements(curSite.pager.pageElement, pageElems, pageElems)[0];
  4331. let chapterImages, chapterPath;
  4332. document.querySelector(curSite.pager.pageElement.replace('css;', '')).innerText = pageElems.textContent; // 将当前网页内的数据所在元素内容改为刚刚获取的下一页数据内容,以便循环获取下一页 URL
  4333. pageElems.textContent.split(';').forEach(function (one){ // 分号 ; 分割为数组并遍历
  4334. //console.log(one)
  4335. if (one.indexOf('chapterImages') > -1) { // 图片文件名数组
  4336. chapterImages = one.replace(/^.+\[/, '').replace(']', '').replaceAll('"', '').split(',')
  4337. } else if (one.indexOf('chapterPath') > -1) { // 图片文件路径
  4338. chapterPath = one.split('"')[1];
  4339. } else if (one.indexOf('pageTitle') > -1) { // 网页标题
  4340. let title = one.split('"')[1];
  4341. window.history.pushState(`{title: ${document.title}, url: ${location.href}}`, title, url); // 添加历史记录
  4342. window.document.title = title; // 修改当前网页标题为下一页的标题
  4343. }
  4344. })
  4345. if (chapterImages && chapterPath) {
  4346. let _img = '';
  4347. chapterImages.forEach(function (one2){ // 遍历图片文件名数组,组合为 img 标签
  4348. _img += '<img src="https://res.xiaoqinre.com/' + chapterPath + one2 + '" data-index="0" style="display: inline-block;">'
  4349. })
  4350. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  4351. // 当前页码 + 1
  4352. pageNum.now = pageNum._now + 1
  4353. }
  4354. }
  4355. }
  4356.  
  4357.  
  4358. // [砂之船动漫家] 的插入前函数(加载图片)
  4359. function szcdmj_functionBefore(pageElems) {
  4360. pageElems.forEach(function (one) {
  4361. if (one.tagName === 'TITLE') {
  4362. let title = one.textContent;
  4363. window.history.pushState(`{title: ${document.title}, url: ${location.href}}`, title, curSite.pageUrl); // 添加历史记录
  4364. window.document.title = title; // 修改当前网页标题为下一页的标题
  4365. one.style.display = 'none';
  4366. } else {
  4367. let now = one.querySelector('img[data-original]')
  4368. if (now) {
  4369. now.src = now.dataset.original;
  4370. now.style.display = 'inline';
  4371. }
  4372. }
  4373. });
  4374. return pageElems
  4375. }
  4376.  
  4377.  
  4378. // [Mangabz 漫画] 初始化(调整本话图片)
  4379. function mangabz_init() {
  4380. pageNumber('del');
  4381. let showimage = document.getElementById('showimage'),
  4382. cp_img = document.getElementById('cp_img'),
  4383. cp_image = document.getElementById('cp_image');
  4384. if (showimage) {showimage.removeAttribute('oncontextmenu');}
  4385. if (cp_img) {cp_img.removeAttribute('oncontextmenu');}
  4386. if (cp_image) {
  4387. cp_image.removeAttribute('oncontextmenu');
  4388. cp_image.removeAttribute('id');
  4389. cp_image.removeAttribute('style');
  4390. }
  4391. }
  4392. // [Mangabz 漫画] 获取下一页地址
  4393. function mangabz_functionNext() {
  4394. var url = '';
  4395. if (MANGABZ_PAGE === MANGABZ_IMAGE_COUNT) { // 下一话
  4396. url = getElementByXpath('//a[./img[contains(@src, "icon_xiayizhang")]]')
  4397. if (url === curSite.pageUrl) return
  4398. curSite.pageUrl = url
  4399. //console.log(curSite.pageUrl)
  4400. getPageElems(curSite.pageUrl); // 访问下一话 URL 获取
  4401. } else { // 下一页
  4402. if (!mkey) var mkey = '';
  4403. url = location.origin + location.pathname + 'chapterimage.ashx' + `?cid=${MANGABZ_CID}&page=${MANGABZ_PAGE + 1}&key=${(mkey)}&_cid=${MANGABZ_CID}&_mid=${MANGABZ_MID}&_dt=${MANGABZ_VIEWSIGN_DT}&_sign=${MANGABZ_VIEWSIGN}`
  4404. if (url === curSite.pageUrl) return
  4405. curSite.pageUrl = url
  4406. //console.log(curSite.pageUrl)
  4407. getPageElems(curSite.pageUrl, 'text', 'GET', '', 'Next'); // 访问下一页 URL 获取
  4408. }
  4409. }
  4410. // [Mangabz 漫画] 插入数据
  4411. function mangabz_insertElement(pageElems, type) {
  4412. if (pageElems) {
  4413. if (type === 'Next') {
  4414. let imgArr = eval(pageElems),
  4415. _img = '';
  4416. for (let now of imgArr) {
  4417. _img += `<img src="${now}">`;
  4418. }
  4419. if (_img) {
  4420. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  4421.  
  4422. // 添加历史记录
  4423. MANGABZ_PAGE += imgArr.length;
  4424. window.history.pushState(`{title: ${document.title}, url: ${location.href}}`, document.title, location.origin + MANGABZ_CURL.substring(0, MANGABZ_CURL.length - 1) + '-p' + MANGABZ_PAGE + '/');
  4425. }
  4426. } else {
  4427. // 插入 <script> 标签
  4428. let scriptElement = pageElems.querySelectorAll('html:not([dir]) > head > script:not([src])'), scriptText = '';
  4429. scriptElement.forEach(function (one) {scriptText += ';' + one.textContent;});
  4430. if (scriptText) {
  4431. document.body.appendChild(document.createElement('script')).textContent = scriptText;
  4432.  
  4433. window.history.pushState(`{title: ${document.title}, url: ${location.href}}`, pageElems.querySelector('title').textContent, curSite.pageUrl);
  4434.  
  4435. // 替换待替换元素
  4436. let oriE = getAllElements(curSite.pager.replaceE),
  4437. repE = getAllElements(curSite.pager.replaceE, pageElems, pageElems);
  4438. if (oriE.length === repE.length) {
  4439. for (let i = 0; i < oriE.length; i++) {
  4440. oriE[i].outerHTML = repE[i].outerHTML;
  4441. }
  4442. }
  4443. MANGABZ_PAGE = 0;
  4444. mangabz_functionNext();
  4445. }
  4446. }
  4447. }
  4448. }
  4449.  
  4450.  
  4451. // 自动无缝翻页
  4452. function pageLoading() {
  4453. if (curSite.SiteTypeID > 0) {
  4454. windowScroll(function (direction, e) {
  4455. if (direction === 'down' && pausePage === true && curSite.SiteTypeID > 0) { // 下滑 且 未暂停翻页 且 SiteTypeID > 0 时,才准备翻页
  4456. let scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop,
  4457. scrollHeight = window.innerHeight || document.documentElement.clientHeight,
  4458. scrollDelta = curSite.pager.scrollDelta;
  4459.  
  4460. if (curSite.pager.type === 3) { // <<<<< 翻页类型 3(依靠元素距离可视区域底部的距离来触发翻页)>>>>>
  4461. let scrollElement = document.querySelector(curSite.pager.scrollElement);
  4462. //console.log(scrollElement.offsetTop - (scrollTop + scrollHeight), scrollDelta, curSite.SiteTypeID)
  4463. if (scrollElement.offsetTop - (scrollTop + scrollHeight) <= scrollDelta) {
  4464. if (curSite.SiteTypeID === SiteType.GAMERSKY_GL) curSite.pager.scrollDelta -= 800 // 游民星空 gl 的比较奇葩,需要特殊处理下
  4465. ShowPager.loadMorePage();
  4466. }
  4467.  
  4468. } else {
  4469. if (document.documentElement.scrollHeight <= scrollHeight + scrollTop + scrollDelta) {
  4470.  
  4471. if (curSite.pager.type === 2) { // <<<<< 翻页类型 2(网站自带了自动无缝翻页功能,只需要点击下一页按钮即可)>>>>>
  4472. let autopbn = document.querySelector(curSite.pager.nextLink);
  4473. if (autopbn) { // 寻找下一页链接
  4474. // 避免重复点击翻页按钮
  4475. if (curSite.pager.nextText) { // 按钮文本,当按钮文本 = 该文本时,才会点击按钮加载下一页
  4476. if (autopbn.innerText === curSite.pager.nextText) {autopbn.click(); pageNum.now = pageNum._now + 1;} // 当前页码 + 1
  4477.  
  4478. } else if (curSite.pager.nextTextOf) { // 按钮文本的一部分,当按钮文本包含该文本时,才会点击按钮加载下一页
  4479. if (autopbn.innerText.indexOf(curSite.pager.nextTextOf) > -1) {autopbn.click(); pageNum.now = pageNum._now + 1;} // 当前页码 + 1
  4480.  
  4481. } else if (curSite.pager.nextHTML) { // 按钮内元素,当按钮内元素 = 该元素内容时,才会点击按钮加载下一页
  4482. if (autopbn.innerHTML === curSite.pager.nextHTML) {autopbn.click(); pageNum.now = pageNum._now + 1;} // 当前页码 + 1
  4483.  
  4484. } else { // 如果没有指定按钮文字就直接点击
  4485. autopbn.click(); pageNum.now = pageNum._now + 1; // 当前页码 + 1
  4486. // 对于没有按钮文字变化的按钮,可以指定间隔时间(默认 300ms)
  4487. if (!curSite.pager.intervals) {curSite.pager.intervals = 300;}
  4488. let _SiteTypeID = curSite.SiteTypeID; curSite.SiteTypeID = 0;
  4489. setTimeout(function(){curSite.SiteTypeID = _SiteTypeID;}, curSite.pager.intervals)
  4490. }
  4491. }
  4492.  
  4493. } else if (curSite.pager.type === 1) { // <<<<< 翻页类型 1(由脚本实现自动无缝翻页)>>>>>
  4494. ShowPager.loadMorePage();
  4495.  
  4496. } else if (curSite.pager.type === 4) { // <<<<< 翻页类型 4(部分简单的动态加载类网站)>>>>>
  4497. // 为百度贴吧的发帖考虑...
  4498. if (!(document.documentElement.scrollHeight <= scrollHeight + scrollTop + 200 && curSite.SiteTypeID === SiteType.BAIDU_TIEBA)) {
  4499. curSite.pager.nextLink();
  4500. }
  4501. if (curSite.pager.intervals) {
  4502. let _SiteTypeID = curSite.SiteTypeID;
  4503. curSite.SiteTypeID = 0;
  4504. setTimeout(function(){curSite.SiteTypeID = _SiteTypeID;}, curSite.pager.intervals)
  4505. }
  4506. }
  4507. }
  4508. }
  4509. }
  4510. });
  4511. }
  4512. }
  4513.  
  4514.  
  4515. // 启用/禁用 (当前网站)
  4516. function menu_disable(type) {
  4517. switch(type) {
  4518. case 'check':
  4519. if(check()) {return true;} else {return false;}; break;
  4520. case 'add':
  4521. add(); break;
  4522. case 'del':
  4523. del(); break;
  4524. }
  4525.  
  4526. function check() { // 存在返回真,不存在返回假
  4527. let list = GM_getValue('menu_disable'); // 读取网站列表
  4528. if (list.indexOf(location.host) === -1) return false // 不存在返回假
  4529. return true
  4530. }
  4531.  
  4532. function add() {
  4533. if (check()) return
  4534. let list = GM_getValue('menu_disable'); // 读取网站列表
  4535. list.push(location.host); // 追加网站域名
  4536. GM_setValue('menu_disable', list); // 写入配置
  4537. location.reload(); // 刷新网页
  4538. }
  4539.  
  4540. function del() {
  4541. if (!check()) return
  4542. let list = GM_getValue('menu_disable'), // 读取网站列表
  4543. index = list.indexOf(location.host);
  4544. list.splice(index, 1); // 删除网站域名
  4545. GM_setValue('menu_disable', list); // 写入配置
  4546. location.reload(); // 刷新网页
  4547. }
  4548. }
  4549.  
  4550.  
  4551. // 左键双击网页空白处暂停翻页
  4552. function pausePageEvent() {
  4553. if (!GM_getValue('menu_pause_page')) return
  4554. if (curSite.SiteTypeID === 0) return
  4555. document.body.addEventListener('dblclick', function () {
  4556. if (pausePage) {
  4557. pausePage = false;
  4558. GM_notification({text: `❌ 已暂停本页 [自动无缝翻页]\n (再次双击可恢复)`, timeout: 2000});
  4559. } else {
  4560. pausePage = true;
  4561. GM_notification({text: `✅ 已恢复本页 [自动无缝翻页]\n (再次双击可暂停)`, timeout: 2000});
  4562. }
  4563. });
  4564. }
  4565.  
  4566.  
  4567. // 显示页码
  4568. function pageNumber(type) {
  4569. if (curSite.SiteTypeID === 0) {let status = document.getElementById('Autopage_number');if (status) {status.style.display = 'none';}; return}
  4570. let status = document.getElementById('Autopage_number');
  4571. switch (type) {
  4572. case 'add':
  4573. add(); break;
  4574. case 'del':
  4575. del(); break;
  4576. case 'set':
  4577. set(); break;
  4578. }
  4579.  
  4580. function add(){
  4581. if (status) {
  4582. if (status.style.display === 'none') {status.style.display = 'flex';}
  4583. return
  4584. }
  4585. // 插入网页
  4586. let _html = `<style>#Autopage_number {top: calc(75vh) !important;left: 0 !important;width: 32px;height: 32px;padding: 6px !important;display: flex;position: fixed !important;opacity: 0.5;transition: .2s;z-index: 1000 !important;cursor: pointer;user-select: none !important;flex-direction: column;align-items: center;justify-content: center;box-sizing: content-box;border-radius: 0 50% 50% 0;transform-origin: center !important;transform: translateX(-8px);background-color: #eee;-webkit-tap-highlight-color: transparent;box-shadow: 1px 1px 3px 0px #aaa !important;color: #000 !important;} #Autopage_number:hover {opacity: 0.9;transform: translateX(0);}</style>
  4587. <div id="Autopage_number" title="1. 此处数字为 [当前页码] (可在脚本菜单中关闭)&#10;&#10;2. 鼠标左键点击此处 [临时暂停本页自动无缝翻页](再次点击可恢复)">${pageNum._now}</div>`
  4588. document.body.insertAdjacentHTML('beforeend', _html);
  4589. // 点击事件(临时暂停翻页)
  4590. document.getElementById('Autopage_number').onclick = function () {
  4591. if (pausePage) {
  4592. pausePage = false; this.style = 'color: #FF5722 !important; font-style: italic !important;';
  4593. } else {
  4594. pausePage = true; this.style = '';
  4595. }
  4596. };
  4597. status = document.getElementById('Autopage_number');
  4598. set();
  4599. }
  4600. // 监听储存当前页码的对象值的变化
  4601. function set(){
  4602. Object.defineProperty(pageNum, 'now', {
  4603. set: function(value) {
  4604. this._now = value;
  4605. if (status) status.textContent = value;
  4606. }
  4607. });
  4608. }
  4609. function del(){
  4610. if (!status) return
  4611. status.style.display = 'none';
  4612. }
  4613. }
  4614.  
  4615.  
  4616. // 菜单开关
  4617. function menu_switch(menu_status, Name, Tips) {
  4618. if (menu_status === true){
  4619. GM_setValue(Name, false);
  4620. } else {
  4621. GM_setValue(Name, true);
  4622. }
  4623. if (Name === 'menu_page_number') {
  4624. if (menu_status === true){pageNumber('del');} else {pageNumber('add');}
  4625. registerMenuCommand(); // 重新注册脚本菜单
  4626. } else {
  4627. location.reload();}
  4628. };
  4629.  
  4630.  
  4631. // 生成 ID
  4632. function generateID() {
  4633. let num = 0
  4634. for (let val in DBSite) {
  4635. DBSite[val].SiteTypeID = num = num + 1;
  4636. }
  4637. }
  4638.  
  4639.  
  4640. // 判断是支持
  4641. function doesItSupport() {
  4642. setDBSite(); // 配置 DBSite 变量对象
  4643.  
  4644. // 遍历判断是否是某个已支持的网站,顺便直接赋值
  4645. let support = false;
  4646. for (let now in DBSite) { // 遍历对象
  4647. if (!DBSite[now].host) continue; // 如果不存在则继续下一个循环
  4648. if (Array.isArray(DBSite[now].host)) { // 如果是数组
  4649. for (let i of DBSite[now].host) { // 遍历数组
  4650. if (i === location.host) {
  4651. if (DBSite[now].functionStart) {
  4652. DBSite[now].functionStart();
  4653. } else {
  4654. curSite = DBSite[now];
  4655. }
  4656. support = true; break; // 如果找到了就退出循环
  4657. }
  4658. }
  4659. } else if (DBSite[now].host instanceof RegExp) {
  4660. if (DBSite[now].host.test(location.host)) {
  4661. if (self != top) {if (!DBSite[now].iframe) break;} // 如果当前位于 iframe 框架下,就需要判断是否需要执行
  4662. if (DBSite[now].functionStart) {
  4663. DBSite[now].functionStart();
  4664. } else {
  4665. curSite = DBSite[now];
  4666. }
  4667. support = true; break; // 如果找到了就退出循环
  4668. }
  4669. } else if (DBSite[now].host === location.host) {
  4670. if (self != top) {if (!DBSite[now].iframe) break;} // 如果当前位于 iframe 框架下,就需要判断是否需要执行
  4671. if (DBSite[now].functionStart) {
  4672. DBSite[now].functionStart();
  4673. } else {
  4674. curSite = DBSite[now];
  4675. }
  4676. support = true; break; // 如果找到了就退出循环
  4677. }
  4678. }
  4679.  
  4680. if (support) {
  4681. console.info('[自动无缝翻页] - 其他网站(独立规则)'); return 1;
  4682. } else if (document.querySelector('meta[name="author"][content*="Discuz!"], meta[name="generator"][content*="Discuz!"]') || (document.querySelector('a[href*="www.discuz.net"]') && document.querySelector('a[href*="www.discuz.net"]').textContent.indexOf('Discuz!') > -1) || (document.getElementById('ft') && document.getElementById('ft').textContent.indexOf('Discuz!') > -1)) {
  4683. console.info('[自动无缝翻页] - Discuz! 论坛'); return 2;
  4684. } else if (document.getElementById('flarum-loading')) {
  4685. console.info('[自动无缝翻页] - Flarum 论坛'); return 3;
  4686. } else if (document.querySelector('link[href*="themes/dux" i], script[src*="themes/dux" i]')) {
  4687. console.info('[自动无缝翻页] - 使用 WordPress DUX 主题的网站'); return 4;
  4688. } else if (self != top) {
  4689. return -1;
  4690. }
  4691. return 0;
  4692. }
  4693.  
  4694.  
  4695. // 获取 Cookie
  4696. function getCookie(name) {
  4697. if (!name) return ''
  4698. let arr = document.cookie.split(';');
  4699. name += '='
  4700. for (let i=0; i<arr.length; i++) {
  4701. let now = arr[i].trim();
  4702. if (now.indexOf(name) == 0) return now.substring(name.length, now.length);
  4703. }
  4704. return '';
  4705. }
  4706.  
  4707.  
  4708. // 类型 4 专用
  4709. function getPageElems(url, type = '', method = 'GET', data = '', type2) {
  4710. //console.log(url, data)
  4711. let mimeType = '';
  4712. if (curSite.pager.mimeType) mimeType = curSite.pager.mimeType;
  4713. GM_xmlhttpRequest({
  4714. url: url,
  4715. method: method,
  4716. data: data,
  4717. responseType: type,
  4718. overrideMimeType: mimeType,
  4719. headers: {
  4720. 'Referer': location.href,
  4721. 'Content-Type': (method === 'POST') ? 'application/x-www-form-urlencoded':''
  4722. },
  4723. timeout: 5000,
  4724. onload: function (response) {
  4725. try {
  4726. //console.log('最终 URL:' + response.finalUrl, '返回内容:' + response.responseText)
  4727. switch (type) {
  4728. case 'json':
  4729. curSite.pager.insertElement(response.response, type2);
  4730. break;
  4731. case 'text':
  4732. curSite.pager.insertElement(response.responseText, type2)
  4733. break;
  4734. default:
  4735. curSite.pager.insertElement(ShowPager.createDocumentByString(response.responseText), type2)
  4736. }
  4737. } catch (e) {
  4738. console.log(e);
  4739. }
  4740. }
  4741. });
  4742. }
  4743.  
  4744.  
  4745. // 插入位置
  4746. function addTo(num) {
  4747. switch (num) {
  4748. case 1:
  4749. return 'beforebegin'; break;
  4750. case 2:
  4751. return 'afterbegin'; break;
  4752. case 3:
  4753. return 'beforeend'; break;
  4754. case 4:
  4755. return 'afterend'; break;
  4756. case 5:
  4757. return 'beforeend'; break;
  4758. }
  4759. }
  4760.  
  4761.  
  4762. // 滚动条事件
  4763. function windowScroll(fn1) {
  4764. var beforeScrollTop = document.documentElement.scrollTop || document.body.scrollTop,
  4765. fn = fn1 || function () {};
  4766. setTimeout(function () { // 延时 1 秒执行,避免刚载入到页面就触发翻页事件
  4767. window.addEventListener('scroll', function (e) {
  4768. var afterScrollTop = document.documentElement.scrollTop || document.body.scrollTop,
  4769. delta = afterScrollTop - beforeScrollTop;
  4770. if (delta == 0) return false;
  4771. fn(delta > 0 ? 'down' : 'up', e);
  4772. beforeScrollTop = afterScrollTop;
  4773. }, false);
  4774. }, 1000)
  4775. }
  4776.  
  4777.  
  4778. // 修改自 https://greasyfork.org/scripts/14178 , https://github.com/machsix/Super-preloader
  4779. var ShowPager = {
  4780. getFullHref: function (e) {
  4781. if (e != null && e.nodeType === 1 && e.href && e.href.slice(0,4) === 'http') return e.href;
  4782. return '';
  4783. },
  4784. createDocumentByString: function (e) {
  4785. if (e) {
  4786. if ('HTML' !== document.documentElement.nodeName) return (new DOMParser).parseFromString(e, 'application/xhtml+xml');
  4787. var t;
  4788. try { t = (new DOMParser).parseFromString(e, 'text/html');} catch (e) {}
  4789. if (t) return t;
  4790. if (document.implementation.createHTMLDocument) {
  4791. t = document.implementation.createHTMLDocument('ADocument');
  4792. } else {
  4793. try {((t = document.cloneNode(!1)).appendChild(t.importNode(document.documentElement, !1)), t.documentElement.appendChild(t.createElement('head')), t.documentElement.appendChild(t.createElement('body')));} catch (e) {}
  4794. }
  4795. if (t) {
  4796. var r = document.createRange(),
  4797. n = r.createContextualFragment(e);
  4798. r.selectNodeContents(document.body);
  4799. t.body.appendChild(n);
  4800. for (var a, o = { TITLE: !0, META: !0, LINK: !0, STYLE: !0, BASE: !0}, i = t.body, s = i.childNodes, c = s.length - 1; c >= 0; c--) o[(a = s[c]).nodeName] && i.removeChild(a);
  4801. return t;
  4802. }
  4803. } else console.error('没有找到要转成 DOM 的字符串');
  4804. },
  4805. loadMorePage: function () {
  4806. if (curSite.pager) {
  4807. var url;
  4808. if (typeof curSite.pager.nextLink == 'function') {
  4809. url = curSite.pager.nextLink();
  4810. } else {
  4811. if (curSite.pager.nextLink.slice(0,4) === 'css;') {
  4812. url = this.getFullHref(getElementByCSS(curSite.pager.nextLink.slice(4)));
  4813. } else {
  4814. url = this.getFullHref(getElementByXpath(curSite.pager.nextLink));
  4815. }
  4816. }
  4817. //console.log(url, curSite.pageUrl);
  4818. if (url === '') return;
  4819. if (curSite.pager.forceHTTPS && location.protocol === 'https:') {url = url.replace(/^http:/,'https:');}
  4820. if (curSite.pageUrl === url) return;// 避免重复加载相同的页面
  4821. curSite.pageUrl = url;
  4822. let mimeType = '';
  4823. if (curSite.pager.mimeType) mimeType = curSite.pager.mimeType;
  4824. // 读取下一页的数据
  4825. GM_xmlhttpRequest({
  4826. url: url,
  4827. method: 'GET',
  4828. overrideMimeType: mimeType,
  4829. headers: {
  4830. 'Referer': location.href
  4831. },
  4832. timeout: 5000,
  4833. onload: function (response) {
  4834. try {
  4835. processResult(response);
  4836. } catch (e) {
  4837. console.log(e);
  4838. }
  4839. }
  4840. });
  4841. }
  4842. },
  4843. };
  4844. function processResult(response) {
  4845. //console.log('最终 URL:' + response.finalUrl, '返回内容:' + response.responseText)
  4846. var newBody = ShowPager.createDocumentByString(response.responseText);
  4847. let pageElems = getAllElements(curSite.pager.pageElement, newBody, newBody),
  4848. toElement = getAllElements(curSite.pager.insertPosition[0])[0];
  4849. //console.log(curSite.pager.pageElement, pageElems, curSite.pager.insertPosition, toElement)
  4850.  
  4851. if (pageElems.length >= 0) {
  4852. // 如果有插入前函数就执行函数
  4853. if (curSite.function && curSite.function.before) {
  4854. if (curSite.function.parameter) { // 如果指定了参数
  4855. pageElems = curSite.function.before(pageElems, curSite.function.parameter);
  4856. } else {
  4857. pageElems = curSite.function.before(pageElems);
  4858. }
  4859. }
  4860.  
  4861. // 插入位置
  4862. let addTo1 = addTo(curSite.pager.insertPosition[1]);
  4863.  
  4864. // 插入新页面元素
  4865. if (curSite.pager.insertPosition[1] === 4) { // 插入到目标本身后面,需要合并后一起插入
  4866. let afterend = '';
  4867. pageElems.forEach(function (one) {afterend += one.outerHTML;});
  4868. toElement.insertAdjacentHTML(addTo1, afterend);
  4869. } else if (curSite.pager.insertPosition[1] === 5) { // 插入到目标内部末尾(针对文本)
  4870. let afterend = '';
  4871. pageElems.forEach(function (one) {afterend += one.innerHTML;});
  4872. toElement.insertAdjacentHTML(addTo1, afterend);
  4873. } else {
  4874. pageElems.forEach(function (one) {toElement.insertAdjacentElement(addTo1, one);});
  4875. }
  4876.  
  4877. // 当前页码 + 1
  4878. pageNum.now = pageNum._now + 1
  4879.  
  4880. // 插入 <script> 标签
  4881. if (curSite.pager.scriptType) {
  4882. let scriptText = '';
  4883. if (curSite.pager.scriptType === 1) { // 下一页的所有 <script> 标签
  4884. const scriptElems = getAllElements('//script', newBody, newBody);
  4885. scriptElems.forEach(function (one) {
  4886. if (one.src) {
  4887. toElement.appendChild(document.createElement('script')).src = one.src;
  4888. } else {
  4889. scriptText += ';' + one.textContent;
  4890. }
  4891. });
  4892. toElement.appendChild(document.createElement('script')).textContent = scriptText;
  4893. } else if (curSite.pager.scriptType === 2) { // 下一页主体元素同级 <script> 标签
  4894. pageElems.forEach(function (one) {if (one.tagName === 'SCRIPT') {scriptText += ';' + one.textContent;}});
  4895. if (scriptText) toElement.appendChild(document.createElement('script')).textContent = scriptText;
  4896. } else if (curSite.pager.scriptType === 3) { // 下一页主体元素同级 <script> 标签(远程文件)
  4897. pageElems.forEach(function (one) {if (one.tagName === 'SCRIPT' && one.src) {toElement.appendChild(document.createElement('script')).src = one.src;}});
  4898. } else if (curSite.pager.scriptType === 4) { // 下一页主体元素子元素 <script> 标签
  4899. pageElems.forEach(function (one) {
  4900. const scriptElems = one.querySelectorAll('script');
  4901. scriptElems.forEach(function (script) {scriptText += ';' + script.textContent;});
  4902. });
  4903. if (scriptText) toElement.appendChild(document.createElement('script')).textContent = scriptText;
  4904. }
  4905. }
  4906.  
  4907. // 添加历史记录
  4908. if (curSite.pager.history && curSite.pager.history == true) {
  4909. window.history.pushState(`{title: ${document.title}, url: ${location.href}}`, newBody.querySelector('title').textContent, curSite.pageUrl);
  4910. }
  4911.  
  4912. // 替换待替换元素
  4913. if (curSite.pager.replaceE) {
  4914. try {
  4915. let oriE = getAllElements(curSite.pager.replaceE),
  4916. repE = getAllElements(curSite.pager.replaceE, newBody, newBody);
  4917. //console.log(oriE, repE);
  4918. if (oriE.length === repE.length) {
  4919. for (let i = 0; i < oriE.length; i++) {
  4920. oriE[i].outerHTML = repE[i].outerHTML;
  4921. }
  4922. }
  4923. } catch (e) {
  4924. console.log(e);
  4925. }
  4926. }
  4927.  
  4928. // 如果有插入后函数就执行函数
  4929. if (curSite.function && curSite.function.after) {
  4930. if (curSite.function.parameter) { // 如果指定了参数
  4931. curSite.function.after(curSite.function.parameter);
  4932. } else {
  4933. curSite.function.after();
  4934. }
  4935. }
  4936. }
  4937. }
  4938. function getElementByCSS(css, contextNode = document) {
  4939. return contextNode.querySelector(css);
  4940. }
  4941. function getAllElementsByCSS(css, contextNode = document) {
  4942. return [].slice.call(contextNode.querySelectorAll(css));
  4943. }
  4944. function getElementByXpath(xpath, contextNode, doc = document) {
  4945. contextNode = contextNode || doc;
  4946. try {
  4947. const result = doc.evaluate(xpath, contextNode, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
  4948. // 应该总是返回一个元素节点
  4949. return result.singleNodeValue && result.singleNodeValue.nodeType === 1 && result.singleNodeValue;
  4950. } catch (err) {
  4951. throw new Error(`Invalid xpath: ${xpath}`);
  4952. }
  4953. }
  4954. function getAllElementsByXpath(xpath, contextNode, doc = document) {
  4955. contextNode = contextNode || doc;
  4956. const result = [];
  4957. try {
  4958. const query = doc.evaluate(xpath, contextNode, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
  4959. for (let i = 0; i < query.snapshotLength; i++) {
  4960. const node = query.snapshotItem(i);
  4961. // 如果是 Element 节点
  4962. if (node.nodeType === 1) result.push(node);
  4963. }
  4964. } catch (err) {
  4965. throw new Error(`无效 Xpath: ${xpath}`);
  4966. }
  4967. return result;
  4968. }
  4969. function getAllElements(selector, contextNode = undefined, doc = document, win = window, _cplink = undefined) {
  4970. if (!selector) return [];
  4971. contextNode = contextNode || doc;
  4972. if (typeof selector === 'string') {
  4973. if (selector.search(/^css;/i) === 0) {
  4974. return getAllElementsByCSS(selector.slice(4), contextNode);
  4975. } else {
  4976. return getAllElementsByXpath(selector, contextNode, doc);
  4977. }
  4978. } else {
  4979. const query = selector(doc, win, _cplink);
  4980. if (!Array.isArray(query)) {
  4981. throw new Error('getAllElements 返回错误类型');
  4982. } else {
  4983. return query;
  4984. }
  4985. }
  4986. }
  4987.  
  4988. // 自定义 locationchange 事件(用来监听 URL 变化)
  4989. function addLocationchange() {
  4990. history.pushState = ( f => function pushState(){
  4991. var ret = f.apply(this, arguments);
  4992. window.dispatchEvent(new Event('pushstate'));
  4993. window.dispatchEvent(new Event('locationchange'));
  4994. return ret;
  4995. })(history.pushState);
  4996.  
  4997. history.replaceState = ( f => function replaceState(){
  4998. var ret = f.apply(this, arguments);
  4999. window.dispatchEvent(new Event('replacestate'));
  5000. window.dispatchEvent(new Event('locationchange'));
  5001. return ret;
  5002. })(history.replaceState);
  5003.  
  5004. window.addEventListener('popstate',()=>{
  5005. window.dispatchEvent(new Event('locationchange'))
  5006. });
  5007. }
  5008.  
  5009. /*// 监听 XMLHttpRequest URL
  5010. var _send = window.XMLHttpRequest.prototype.send
  5011. function sendReplacement(data) {
  5012. console.log(data)
  5013. return _send.apply(this, arguments);
  5014. }
  5015. window.XMLHttpRequest.prototype.send = sendReplacement;
  5016. // 监听 XMLHttpRequest 模式(GET/POST)和数据
  5017. var _open = window.XMLHttpRequest.prototype.open
  5018. function openReplacement(data) {
  5019. console.log(data, arguments)
  5020. return _open.apply(this, arguments);
  5021. }
  5022. window.XMLHttpRequest.prototype.open = openReplacement;*/
  5023. })();