自动展开全文阅读更多

自动展开网站全文内容而无需点击,去掉一些烦人广告,去掉需要打开app的提示,站外链直达(支持鼠标左右键和拖拽打开),避免网址重定向浪费时间,支持免登陆复制文字,兼容手机和电脑端。 -- 【目前已支持上百个网站】

  1. // ==UserScript==
  2. // @name 自动展开全文阅读更多
  3. // @version 1.154.1
  4. // @author baster
  5. // @description 自动展开网站全文内容而无需点击,去掉一些烦人广告,去掉需要打开app的提示,站外链直达(支持鼠标左右键和拖拽打开),避免网址重定向浪费时间,支持免登陆复制文字,兼容手机和电脑端。 -- 【目前已支持上百个网站】
  6. // @supportURL https://greasyfork.org/zh-CN/users/306433
  7. // @homepageURL https://greasyfork.org/zh-CN/users/306433
  8. // @namespace https://greasyfork.org/zh-CN/users/306433
  9. // @icon https://img.icons8.com/stickers/100/000000/double-down.png
  10. // @match *://theqoo.net/*
  11. // @match *://m.36kr.com/*
  12. // @match *://ext.baidu.com/api/comment/*
  13. // @match *://www.xz577.com/*
  14. // @match *://*.huanqiu.com/*
  15. // @match *://iknow.lenovo.com.cn/*
  16. // @match *://g.pconline.com.cn/*
  17. // @match *://www.it1352.com/*
  18. // @match *://www.jianshu.com/p/*
  19. // @match *://*.csdn.net/*
  20. // @match *://jingyan.baidu.com/article/*
  21. // @match *://baijiahao.baidu.com/s*
  22. // @match *://haokan.baidu.com/v*
  23. // @match *://zhidao.baidu.com/question/*
  24. // @match *://m.21jingji.com/article/*
  25. // @match *://www.bjtzdbzz.com/*
  26. // @match *://chejiahao.m.autohome.com.cn/info/*
  27. // @match *://www.bandbbs.cn/threads/*
  28. // @match *://*.elecfans.com/*
  29. // @match *://yiidian.com/*
  30. // @match *://*.yiidian.com/*
  31. // @match *://m.jb51.cc/*
  32. // @match *://www.jb51.cc/*
  33. // @match *://baike.baidu.com/item/*
  34. // @match *://wap.peopleapp.com/article/*
  35. // @match *://blog.51cto.com/*
  36. // @match *://xuedingmiao.com/*
  37. // @match *://xw.qq.com/*
  38. // @match *://mbd.baidu.com/newspage/*
  39. // @match *://ailegal.baidu.com/*
  40. // @match *://www.cnbeta.com/articles/*
  41. // @match *://www.zhihu.com/question/*
  42. // @match *://zhuanlan.zhihu.com/p/*
  43. // @match *://*.imooc.com/*
  44. // @match *://*.py.cn/code/*
  45. // @match *://*.sina.com.cn/*
  46. // @match *://juejin.cn/post/*
  47. // @match *://www.oschina.net/*
  48. // @match *://iswbm.com/*
  49. // @match *://m.so.com/s?q=*
  50. // @match *://wap.sogou.com/web/*
  51. // @match *://*.douban.com/*
  52. // @match *://www.wxnmh.com/*
  53. // @match *://www.chinaz.com/*
  54. // @match *://gitee.com/*
  55. // @match *://www.tianyancha.com/*
  56. // @match *://www.shaduizi.com/*
  57. // @match *://show.bookmarkearth.com/view/*
  58. // @match *://www.423down.com/*
  59. // @match *://www.itdaan.com/*
  60. // @match *://www.iteye.com/blog/*
  61. // @match *://www.360doc.com/*
  62. // @match *://www.360doc.cn/*
  63. // @match *://developer.aliyun.com/*
  64. // @match *://cloud.tencent.com/*
  65. // @match *://mail.qq.com/*
  66. // @match *://tieba.baidu.com/*
  67. // @match *://www.tieba.com/*
  68. // @match *://*.ifeng.com/*
  69. // @match *://*.ximalaya.com/*
  70. // @match *://www.sanzhima.com/*
  71. // @match *://m.meishichina.com/*
  72. // @match *://www.logonews.cn/*
  73. // @match *://segmentfault.com/*
  74. // @match *://ld246.com/*
  75. // @match *://*.bilibili.com/*
  76. // @match *://*.toutiao.com/*
  77. // @match *://www.itbaoku.cn/*
  78. // @match *://support.qq.com/*
  79. // @match *://m.downxia.com/*
  80. // @match *://*.sohu.com/*
  81. // @match *://m.weibo.cn/u/*
  82. // @match *://card.weibo.com/*
  83. // @match *://www.yunqishi.net/*
  84. // @match *://stackoom.com/*
  85. // @match *://www.codeprj.com/*
  86. // @match *://m.yezicc.com/*
  87. // @match *://*.ali213.net/*
  88. // @match *://itpcb.com/*
  89. // @match *://*.vovososo.com/*
  90. // @match *://www.lishixinzhi.com/*
  91. // @match *://www.anquanke.com/*
  92. // @match *://m.hexun.com/*
  93. // @match *://www.javascriptcn.com/*
  94. // @match *://*.zol.com.cn/*
  95. // @match *://www.5axxw.com/*
  96. // @match *://3g.163.com/*
  97. // @match *://*.js-code.com/*
  98. // @match *://*.wenda.so.com/*
  99. // @match *://wenda.so.com/*
  100. // @match *://*.dxy.cn/*
  101. // @match *://*heidong.com/*
  102. // @match *://www.tofacebook.com/*
  103. // @match *://www.ngui.cc/*
  104. // @match *://ddrv.cn/*
  105. // @match *://www.qcc.com/*
  106. // @match *://*.cnr.cn/*
  107. // @match *://*tinymind.net.cn/*
  108. // @match *://view.inews.qq.com/*
  109. // @match *://*gamersky.com/*
  110. // @match *://*.bugscaner.com/*
  111. // @match *://*.dgrt.cn/*
  112. // @match *://devnote.pro/*
  113. // @match *://betheme.net/*
  114. // @match *://*.rstk.cn/*
  115. // @match *://*.taodudu.cc/*
  116. // @match *://weibo.com/ttarticle/p/show*
  117. // @match *://weibo.com/cmbchina*
  118. // @match *://weibo.com/u/*
  119. // @match *://www.ctfiot.com/*
  120. // @match *://www.takefoto.cn/*
  121. // @match *://www.autohotkey.com/*
  122. // @match *://www.95pm.com/*
  123. // @match *://*.betheme.net/*
  124. // @match *://*.zoukankan.com/*
  125. // @match *://*.hexun.com/*
  126. // @match *://*.xjx100.cn/*
  127. // @match *://*.yii666.com/*
  128. // @match *://*.pianshen.com/*
  129. // @match *://*.knowbaike.com/*
  130. // @match *://pythonjishu.com/*
  131. // @match *://m.freebuf.com/*
  132. // @match *://www.nuomiphp.com/*
  133. // @match *://dhexx.cn/*
  134. // @match *://*.exyb.cn/*
  135. // @match *://ispacesoft.com/*
  136. // @match *://www.3424.cn/*
  137. // @match *://*.cnq.net/*
  138. // @match *://txc.qq.com/*
  139. // @match *://m.bjnews.com.cn/*
  140. // @match *://www.cn-healthcare.com/*
  141. // @match *://www.wevul.com/*
  142. // @match *://*.yuque.com/*
  143. // @match *://*.66law.cn/*
  144. // @match *://*.ssap.com.cn/*
  145. // @match *://*.chinaacc.com/*
  146. // @match *://lvlin.baidu.com/*
  147. // @match *://*.64365.com/*
  148. // @match *://programmercarl.com/*
  149. // @match *://*.qdxiaochuan.com/*
  150. // @match *://*.zjh336.cn/*
  151. // @match *://*.volcengine.com/*
  152. // @match *://*.289.com/*
  153. // @match *://*.hi-linux.com/*
  154. // @match *://*.chusan.com/*
  155. // @match *://*.nowcoder.com/*
  156. // @match *://*.techgrow.cn/*
  157. // @match *://*.gaodun.com/*
  158. // @match *://easylearn.baidu.com/*
  159. // @match *://*.youlai.cn/*
  160. // @match *://*.cndzys.com/*
  161. // @match *://*.jiangzi.com/*
  162. // @match *://*.dazhong.com/*
  163. // @match *://discussions*.apple.com/*
  164. // @match *://www.msn.cn/*
  165. // @match *://*.pcbaby.com.cn/*
  166. // @match *://*.youzan.com/*
  167. // @match *://*.93300.cn/*
  168. // @match *://sspai.com/*
  169. // @match *://*.xjishu.com/*
  170. // @match *://*.eastday.com/*
  171. // @match *://*.tuidc.com/*
  172. // @match *://*.saoniuhuo.com/*
  173. // @match *://*.pingguolv.com/*
  174. // @match *://*.ppmy.cn/*
  175. // @match *://*.ultimate-communications.com/*
  176. // @match *://*.zmtpc.com/*
  177. // @match *://m.eeo.com.cn/*
  178. // @match *://*.sina.cn/*
  179. // @grant GM_addStyle
  180. // @grant GM_openInTab
  181. // @grant unsafeWindow
  182. // @run-at document-start
  183. // ==/UserScript==
  184.  
  185. (function () {
  186. var websites = [
  187. {
  188. match: ["*://*.sina.cn/*"],
  189. hide: [".read-unfold-box", "#article_end + div", "#m-sentiment3"],
  190. expand: [".main-article-body"],
  191. },
  192. {
  193. match: ["*://m.eeo.com.cn/*"],
  194. wait: [
  195. [".a-load",
  196. node => {
  197. node.click();
  198. return false;
  199. },
  200. ],
  201. [".more",
  202. node => {
  203. node.click();
  204. return false;
  205. }
  206. ],
  207. ]
  208. },
  209. {
  210. match: ["*://*.ultimate-communications.com/*"],
  211. hide: [".readall_box"],
  212. expand: [".content-content"],
  213. },
  214. {
  215. match: ["*://*.pingguolv.com/*"],
  216. hide: [".click_more"],
  217. expand: ["mip-showmore"],
  218. },
  219. {
  220. match: ["*://*.zmtpc.com/*"],
  221. hide: [".readall"],
  222. expand: [".article .newstext"],
  223. },
  224. {
  225. match: ["*://*.saoniuhuo.com/*"],
  226. hide: [".mrc-btn-wrap"],
  227. expand: [".mrc-content"],
  228. },
  229. {
  230. match: ["*://*.tuidc.com/*"],
  231. hide: [".bottom_all_text_btn", ".bottom_all_text"],
  232. expand: [".ty_text_box"],
  233. },
  234. {
  235. match: ["*://*.eastday.com/*"],
  236. hide: [".expand-btn"],
  237. expand: [".post-content"],
  238. },
  239. {
  240. match: ["*://*.xjishu.com/*"],
  241. hide: [".gradBox", ".art-download"],
  242. expand: [".con-box"],
  243. },
  244. {
  245. match: ["*://sspai.com/*"],
  246. hide: ["#btn-call-app"],
  247. },
  248. {
  249. match: ["*://easylearn.baidu.com/edu-page/tiangong/*"],
  250. hide: [".bgk-detail .main-bottom", ".bgk-detail .banner", ".vip-banner-cont", ".vip-card-warp", ".business-el-line", ".question-cont .tigan .mask .toogle-btn"],
  251. expand: [".question-cont .tigan"],
  252. wait: [
  253. [".more-text",
  254. node => {
  255. node.click();
  256. return false;
  257. },
  258. ],
  259. [".dan-btn",
  260. node => {
  261. node.click();
  262. return false;
  263. },],
  264. [".exercise-btn-4",
  265. node => {
  266. node.click();
  267. return false;
  268. },],
  269. [".expand-btn",
  270. node => {
  271. node.click();
  272. return false;
  273. },],
  274. ]
  275. },
  276. {
  277. match: ["*://www.msn.cn/*"],
  278. hide: [".article-cont-read-button-container"],
  279. expand: [".article-body"],
  280. start: () => {
  281. Element.prototype._attachShadow = Element.prototype.attachShadow;
  282. Element.prototype.attachShadow = function () {
  283. let css = `
  284. .article-body
  285. {
  286. height: auto !important;
  287. max-height: unset !important;
  288. overflow: unset !important;
  289. -webkit-line-clamp: unset !important;
  290. }
  291. `;
  292. let style = document.createElement("style");
  293. style.type = "text/css";
  294. try {
  295. style.innerHTML = css;
  296. } catch (x) {
  297. style.innerText = css;
  298. }
  299. let shadow = this._attachShadow({ mode: "open" });
  300. shadow.appendChild(style);
  301. return shadow;
  302. };
  303. },
  304. },
  305. {
  306. match: ["*://*.93300.cn/*"],
  307. hide: [".entry-readmore"],
  308. expand: [".entry-content"],
  309. },
  310. {
  311. match: ["*://*.youzan.com/*"],
  312. hide: [".cms-article-lock"],
  313. expand: [".content-content"],
  314. },
  315. {
  316. match: ["*://ailegal.baidu.com/*"],
  317. hide: [".article-content .expand", ".article-content .mask"],
  318. expand: [".article-content .article-text"],
  319. },
  320. {
  321. match: ["*://*.pcbaby.com.cn/*"],
  322. hide: [".mip-showmore-btn"],
  323. expand: ["mip-showmore"],
  324. },
  325. {
  326. match: ["*://discussions*.apple.com/*"],
  327. hide: [".post-content-toggle .post-content-toggle-button"],
  328. expand: [".post-content-toggle", ".post-body.collapsed"],
  329. },
  330. {
  331. match: ["*://*.dazhong.com/*"],
  332. hide: ["#read-more", ".content-more"],
  333. expand: ["#wrap", "#cont"],
  334. },
  335. {
  336. match: ["*://*.jiangzi.com/*"],
  337. hide: [".show_more_btn"],
  338. expand: ["#readtxt-video", ".detailText"],
  339. },
  340. {
  341. match: ["*://*.cndzys.com/*"],
  342. hide: [".content-more"],
  343. expand: ["#cont"],
  344. },
  345. {
  346. match: ["*://*.youlai.cn/*"],
  347. hide: [".mip-showore-btn-bar"],
  348. expand: ["#show-more"],
  349. },
  350. {
  351. match: ["*://*.gaodun.com/*"],
  352. hide: [".view-more"],
  353. expand: [".m-context"],
  354. },
  355. {
  356. match: ["*://*.techgrow.cn/*"],
  357. hide: ["#readmore-wrapper"],
  358. expand: ["#readmore-container"],
  359. },
  360. {
  361. // https://m.nowcoder.com/discuss/607623789546844160
  362. // https://greasyfork.org/zh-CN/scripts/440400-%E8%87%AA%E5%8A%A8%E5%B1%95%E5%BC%80%E5%85%A8%E6%96%87%E9%98%85%E8%AF%BB%E6%9B%B4%E5%A4%9A/discussions/239120
  363. match: ["*://*.nowcoder.com/*"],
  364. hide: [".view-more-btn", ".article-btns-open", "#cyh_banner"],
  365. expand: ["div[id^='data']", ".xle.pop_.cn_"],
  366. js: () => {
  367. $(".continue-btn").click();
  368. let el = document.querySelector(".ncmain.appwithsplit");
  369. if (el) {
  370. el.__vue__.$options.parent.isShowAll = true;
  371. }
  372.  
  373. nodes = document.querySelectorAll(".wonder-item");
  374. nodes.forEach(item => {
  375. item.__vue__.maxOneLineFontNum = 1000;
  376. item.__vue__.commentDisable = false;
  377. });
  378. $(".wonder-list").parent().parent()[0].__vue__.isShowAllList = true;
  379.  
  380. nodes = querySelectorIncludesText('span.text-content', 'APP内查看完整回复');
  381. nodes.forEach(item => {
  382. item.remove();
  383. });
  384. },
  385. start: () => {
  386. var post = {};
  387. Object.defineProperty(unsafeWindow, "post", {
  388. get: function () {
  389. return post;
  390. },
  391. set: function (value) {
  392. post = value;
  393. post.isTestCmtGoApp = false;
  394. post.isTestHotTalkGoApp = false;
  395. },
  396. enumerable: true,
  397. configurable: false,
  398. });
  399. },
  400. },
  401. {
  402. match: ["*://*.chusan.com/*"],
  403. hide: [".view-more-btn", ".article-btns-open", "#cyh_banner"],
  404. expand: ["div[id^='data']", ".xle.pop_.cn_"],
  405. },
  406. {
  407. match: ["*://*.hi-linux.com/*"],
  408. hide: ["#read-more-wrap"],
  409. expand: ["#vip-container"],
  410. },
  411. {
  412. match: ["*://*.289.com/*"],
  413. hide: [".f-show-cont"],
  414. expand: [".m-downmain"],
  415. },
  416. {
  417. match: ["*://*.volcengine.com/*"],
  418. hide: ["div[class*='button-AVOE'][class*='volcfe-flex-middle']", "div[class^='cover-']"],
  419. expand: ["div[class^='content-'][class*='hidden-']"],
  420. hookEvent: ["copy"],
  421. },
  422. {
  423. match: ["*://*.zjh336.cn/*"],
  424. hide: [".readnum"],
  425. expand: [".viewall_plugin"],
  426. },
  427. {
  428. match: ["*://*.qdxiaochuan.com/*"],
  429. hide: [".teles, .telesmore"],
  430. expand: [".postcon"],
  431. },
  432. {
  433. match: ["*://programmercarl.com/*"],
  434. hide: ["#read-more-wrap"],
  435. expand: [".theme-default-content"],
  436. },
  437. {
  438. match: ["*://*.64365.com/*"],
  439. hide: [".zs-unfold .unfd-btn-bar"],
  440. expand: [".unfd-ovh"],
  441. },
  442. {
  443. match: ["*://lvlin.baidu.com/*"],
  444. hide: [".check-more.check-fold"],
  445. expand: [".main-content-box"],
  446. },
  447. {
  448. match: ["*://*.chinaacc.com/*"],
  449. hide: [".news-con-mod .news-more-panel"],
  450. expand: [".news-con-mod"],
  451. },
  452. {
  453. match: ["*://*.ssap.com.cn/*"],
  454. hide: [".yueduqi_over"],
  455. expand: [".yueduqi_content"],
  456. },
  457. {
  458. match: ["*://*.yuque.com/*"],
  459. hide: ["div[class^=index-module_bottomAdvertiseWrapper]"],
  460. },
  461. {
  462. match: ["*://www.wevul.com/*"],
  463. directLink: [
  464. "*/go/*",
  465. (node) => {
  466. const regex = /\/go\/([^\/]+)$/;
  467. const base64Str = node.href.match(regex)[1];
  468. const decodedStr = atob(base64Str);
  469. node.href = decodedStr;
  470. node.setAttribute("target", "_blank");
  471.  
  472. },
  473. ],
  474. },
  475. {
  476. match: ["*://*.66law.cn/*"],
  477. hide: [".det-unfold .unfd-flex-bar .unfd-btn"],
  478. expand: [".unfold-bar .unfd-ovh"],
  479. },
  480. {
  481. match: ["*://www.cn-healthcare.com/*"],
  482. hide: [".mask, .ni_mask", "footer"],
  483. expand: ["#artbody"],
  484. },
  485. {
  486. match: "*://txc.qq.com/*",
  487. directLink: ["*/link-jump?jump=*", "jump"],
  488. },
  489. {
  490. match: ["*://m.bjnews.com.cn/*"],
  491. hide: [".article > .shade"],
  492. expand: [".article"],
  493. },
  494. {
  495. match: ["*://*.cnq.net/*"],
  496. hide: ["#readmore-wrapper"],
  497. expand: ["#readmore-container"],
  498. },
  499. {
  500. match: ["*://www.3424.cn/*"],
  501. hide: [".div-mask>.div-showbtn"],
  502. expand: [".contents article"],
  503. },
  504. {
  505. match: ["*://ispacesoft.com/*"],
  506. hide: [".entry-readmore"],
  507. expand: [".entry-content"],
  508. },
  509. {
  510. // https://theqoo.net/hot/2963319501
  511. match: ["*://theqoo.net/*"],
  512. js: () => {
  513. var nowScroll = $(window).scrollTop();
  514. $(document).ajaxComplete(function (event, xhr, settings) {
  515. if (settings && settings.data && (settings.data.includes('act=dispBoardContentCommentListTheqoo') || settings.data.includes('act=dispTheqooContentCommentListTheqoo'))) {
  516. $(window).scrollTop(nowScroll);
  517. if ($(".show_more:not([style='display: none;'])").length > 0) {
  518. $(".show_more:not([style='display: none;'])").click();
  519. }
  520. }
  521. });
  522. }
  523. },
  524. {
  525. match: ["*://m.freebuf.com/*"],
  526. js: () => {
  527. if (window.innerWidth > 1024) {
  528. location.href = location.href.replace('m.freebuf.com', 'www.freebuf.com');
  529. }
  530. }
  531. },
  532. {
  533. match: ["*://www.nuomiphp.com/*"],
  534. hide: [".question-richtext .read-more"],
  535. expand: [".question-richtext"],
  536. },
  537. {
  538. match: ["*://pythonjishu.com/*"],
  539. hide: [".entry-readmore"],
  540. expand: [".entry-content"],
  541. },
  542. {
  543. match: ["*://*.knowbaike.com/*"],
  544. hide: ["#read-more"],
  545. expand: [".art-txt"],
  546. js: () => {
  547. document.oncontextmenu = function () { return true; };
  548. document.onkeydown = function () { return true; };
  549. }
  550. },
  551. {
  552. // 抄袭站直接跳转到原文即可
  553. match: ["*://*.pianshen.com/*"],
  554. js: () => {
  555. $('head').append('<meta name="referrer" content="never">');
  556. let url = $('#gotosource a').attr('href');
  557. if (url) {
  558. location.href = url;
  559. }
  560. }
  561. },
  562. {
  563. // 抄袭站直接跳转到原文即可
  564. match: ["*://*.yii666.com/*"],
  565. hide: ["#vipReadAll", ".sidebar"],
  566. expand: [".article-content-height"],
  567. js: () => {
  568. $('head').append('<meta name="referrer" content="never">');
  569. let url = $('.OpenToUrl').attr('data-href');
  570. if (url) {
  571. location.href = url;
  572. }
  573. }
  574. },
  575. {
  576. match: ["*://*.xjx100.cn/*", "*://dhexx.cn/*", "*://*.ppmy.cn/*"],
  577. js: () => {
  578. $('head').append('<meta name="referrer" content="never">');
  579. var originalTextMethod = $.fn.text;
  580. $.fn.text = function (value) {
  581. if (arguments.length === 0) {
  582. return originalTextMethod.call(this);
  583. } else {
  584. let re = originalTextMethod.call(this, value);
  585. let text = $('.source_url').text();
  586. if (text && (text.includes("http://") || text.includes("https://"))) {
  587. let regex = /(https?:\/\/[^\s]+)/;
  588. location.href = text.match(regex)[0];
  589. }
  590. return re;
  591. }
  592. };
  593. let text = $('.source_url').text();
  594. if (text && (text.includes("http://") || text.includes("https://"))) {
  595. let regex = /(https?:\/\/[^\s]+)/;
  596. location.href = text.match(regex)[0];
  597. } else {
  598. var test = false;
  599. var scriptTags = $("script");
  600. scriptTags.each(function () {
  601. var src = $(this).attr("src");
  602. if (src && src.includes("?source_url=")) {
  603. let { source_url } = parseUrl(src);
  604. if (source_url) {
  605. test = true;
  606. location.href = source_url;
  607. }
  608. }
  609. });
  610. if (!test) {
  611. let url = $('#vip').find('a').attr('href');
  612. if (url) {
  613. location.href = $('#vip').find('a').attr('href');
  614. }
  615. }
  616. }
  617.  
  618. }
  619.  
  620. },
  621. {
  622. match: ["*://*.zoukankan.com/*"],
  623. js: () => {
  624. $('head').append('<meta name="referrer" content="never">');
  625. let nodeList = querySelectorIncludesText('a[href^="http"]', '查看全文');
  626. if (nodeList.length > 0) {
  627. location.href = nodeList[0].href;
  628. }
  629. }
  630. },
  631. {
  632. match: ["*://*.hexun.com/*"],
  633. hide: ["div.showAll", "div.bottomLayer"],
  634. expand: ["div.art_contextBox"],
  635. },
  636. {
  637. match: ["*://*.betheme.net/*"],
  638. hide: ["#vip"],
  639. expand: [".articleHeight"],
  640. },
  641. {
  642. match: ["*://www.95pm.com/*"],
  643. hide: [".readall_box"],
  644. expand: [".readall-body"],
  645. },
  646. {
  647. match: ["*://www.takefoto.cn/*"],
  648. hide: [".content .article .article-text .load"],
  649. expand: [".article-text"]
  650. },
  651. {
  652. expand: [".content .article .article-text"],
  653. match: ["*://www.autohotkey.com/*"],
  654. js: () => {
  655. const items = document.querySelectorAll('.codebox > p > a:first-child + :nth-child(2)');
  656. items.forEach(item => {
  657. expandCode(item);
  658. });
  659. },
  660. },
  661. {
  662. match: ["*://www.ctfiot.com/*"],
  663. directLink: [
  664. "*/go/?url=*",
  665. (node) => {
  666. let { url } = parseUrl(node.href);
  667. if (url) {
  668. node.href = atob(url);
  669. node.setAttribute("target", "_blank");
  670. }
  671. },
  672. ],
  673. },
  674. {
  675. // https://weibo.com/cmbchina
  676. match: ["*://weibo.com/cmbchina*", "*://weibo.com/u/*"],
  677. wait: [
  678. [
  679. "span.expand",
  680. node => {
  681. node.click();
  682. return false;
  683. }
  684. ]
  685. ]
  686. },
  687. {
  688. // https://weibo.com/ttarticle/p/show?id=2309404890441668493647
  689. match: ["*://weibo.com/ttarticle/p/show*"],
  690. hide: [".artical_add_box"],
  691. expand: [".WB_editor_iframe_new"],
  692. },
  693. {
  694. match: ["*://*.rstk.cn/*", "*://*.taodudu.cc/*", "*://*.dgrt.cn/*", "*://*.exyb.cn/*"],
  695. hide: ["div#vip"],
  696. expand: [".article_content"],
  697. },
  698. {
  699. match: ["*://betheme.net/*"],
  700. hide: ["div#vip"],
  701. expand: [".articleHeight"],
  702. },
  703. {
  704. match: ["*://devnote.pro/*"],
  705. hide: [".readmore-box"],
  706. expand: [".post-mask"],
  707. },
  708. {
  709. match: ["*://*.bugscaner.com/*"],
  710. hide: ["#div_qrcode_container", "#top-header"],
  711. },
  712. {
  713. match: ["*://*tinymind.net.cn/*"],
  714. start: () => {
  715. // 或者废掉DOMMouseScroll
  716. unsafeWindow.verify_flag = 1;
  717. unsafeWindow.phone_verify_flag = 1;
  718. Object.defineProperty(unsafeWindow, "verify_flag", {
  719. get: function () {
  720. return 1;
  721. },
  722. enumerable: true,
  723. configurable: false,
  724. });
  725. Object.defineProperty(unsafeWindow, "phone_verify_flag", {
  726. get: function () {
  727. return 1;
  728. },
  729. enumerable: true,
  730. configurable: false,
  731. });
  732. },
  733. },
  734. {
  735. // https://view.inews.qq.com/k/20210608A045BD00
  736. match: ["*://view.inews.qq.com/*"],
  737. hide: ["div[class^=show-more_outer]", "div[class^=slider-top-bar_sliderWrapper]"],
  738. expand: ["div[class^=show-more_height-not-full]"],
  739. },
  740. {
  741. // https://wap.gamersky.com/news/Content-1571244.html
  742. match: ["*://*gamersky.com/*"],
  743. hide: [".gsAreaContextOpen", ".ymwBootDownload"],
  744. expand: ["#gsAreaContext"],
  745. },
  746. {
  747. match: ["*://www.qcc.com/*"],
  748. directLink: ["*://www.qcc.com/web/transfer-link?link=*", "link"],
  749. },
  750. {
  751. match: ["*://*.cnr.cn/*"],
  752. hide: ["#readmore"],
  753. expand: ["#perny-main"],
  754. },
  755. {
  756. match: ["*://www.ngui.cc/*"],
  757. hide: ["#vip"],
  758. expand: ["#contentWraper", ".article_content"],
  759. },
  760. {
  761. match: ["*://ddrv.cn/*"],
  762. hide: ["#read-more-wrap"],
  763. expand: ["#container"],
  764. },
  765. {
  766. match: ["*://*.dxy.cn/*"],
  767. hide: ["div[class^=contentWrapBottom_]"],
  768. expand: ["div[class^=contentWrap_]"],
  769. },
  770. {
  771. match: ["*://www.tofacebook.com/*"],
  772. hide: [".topic .more-box"],
  773. expand: [".topic"],
  774. },
  775. {
  776. // https://wenda.so.com/q/1679797307210735
  777. match: ["*://*wenda.so.com/*"],
  778. hide: ["#show-rest-entry", ".answer-part__has-folder__btn", ".unfold-page.js-unfold-page", "#js-unfold-more"],
  779. expand: ["#det-content", ".answer-part__has-folder", "#js-ans-box-first"],
  780. wait: [[".hide.js-unfold-answer.answer-fold-box", (node) => node.classList.remove("hide")]],
  781. },
  782. {
  783. match: ["*://*.js-code.com/*"],
  784. hide: ["#read-more-wrap"],
  785. expand: ["#codeContent", "#container"],
  786. },
  787. {
  788. match: ["*://*heidong.com/*"],
  789. hide: [".ggbox"],
  790. start: () => {
  791. // 阻止牛皮癣弹框
  792. unsafeWindow.user_login = true;
  793. Object.defineProperty(unsafeWindow, "user_login", {
  794. get: function () {
  795. return true;
  796. },
  797. enumerable: true,
  798. configurable: true,
  799. });
  800. },
  801. },
  802. {
  803. // https://wap.zol.com.cn/ask/x_19257207.html
  804. match: ["*://*.zol.com.cn/*"],
  805. hide: [".unfold-article-btn", ".wap__bottom-app-button"],
  806. expand: [".article-content"],
  807. wait: [
  808. ["div.show-all-reply", "click"]
  809. ]
  810. },
  811. {
  812. match: ["*://3g.163.com/*"],
  813. hide: [".backflow-floating.js-open-app"],
  814. },
  815. {
  816. // 某些采集机翻引流站点
  817. match: ["*://www.5axxw.com/*"],
  818. hide: ["#gzh-mask", "#gzh-modal"],
  819. },
  820. {
  821. match: ["*://m.hexun.com/*"],
  822. hide: [".article-open"],
  823. expand: [".article"],
  824. },
  825. {
  826. // var key = 'read' + (new Date).toJSON().substring(0, 7); localStorage
  827. match: ["*://www.javascriptcn.com/*"],
  828. hide: [".readall_box"],
  829. expand: [".markdown-body"],
  830. },
  831. {
  832. match: ["*://www.anquanke.com/*"],
  833. directLink: ["*://*/outLinkPage/?target=*", "target"],
  834. },
  835. {
  836. match: ["*://*.vovososo.com/*"],
  837. directLink: [
  838. "*/jump.html?url=*",
  839. (node) => {
  840. let { url } = parseUrl(node.href);
  841. if (url) {
  842. node.href = atob(url);
  843. node.setAttribute("target", "_blank");
  844. }
  845. },
  846. ],
  847. },
  848. {
  849. match: ["*://itpcb.com/*"],
  850. hide: ["#read-more-wrap"],
  851. expand: ["#container"],
  852. },
  853. {
  854. match: ["*://www.lishixinzhi.com/*"],
  855. hide: ["#showbtn"],
  856. expand: ["#endtext"],
  857. },
  858. {
  859. match: ["*://*.ali213.net/*"],
  860. hide: [".unfold-field.unfold-field-download", ".read-all-con", ".download-text"],
  861. expand: [".detail_content", "#Content"],
  862. },
  863. {
  864. match: ["*://m.yezicc.com/*"],
  865. hide: [".fulltext-button"],
  866. expand: ["#article-body > .wrap"],
  867. },
  868. {
  869. match: ["*://stackoom.com/*", "*://www.codeprj.com/*"],
  870. js: () => {
  871. if (!$.cookie("openid") || !$.cookie("loginCode")) {
  872. $.cookie("openid", "1", { expires: 7 });
  873. $.cookie("loginCode", "1", { expires: 7 });
  874. }
  875. },
  876. },
  877. {
  878. match: ["*://www.yunqishi.net/*"],
  879. hide: [".ckgd"],
  880. expand: [".tw_contain"],
  881. },
  882. {
  883. match: ["*://card.weibo.com/*", "*://weibo.com/ttarticle/*"],
  884. hide: [".f-art-opt"],
  885. expand: [".f-art"],
  886. },
  887. {
  888. match: ["*://m.weibo.cn/u/*"],
  889. directLink: ["*://weibo.cn/sinaurl?u=*", "u"],
  890. },
  891. {
  892. // https://m.sohu.com/a/442909096_120459022/?pvid=000115_3w_a
  893. match: "*://*.sohu.com/*",
  894. hide: [".lookall-box", "#CallAppContainer"],
  895. css: `
  896. .hidden-content.hide,.control-hide {
  897. display: block !important;
  898. }
  899. `,
  900. js: () => {
  901. $('#artLookAll').click();
  902. }
  903. },
  904. {
  905. match: "*://m.downxia.com/*",
  906. hide: ["a.slide-btn"],
  907. expand: [".chapter-cont"],
  908. css: `
  909. .chapter-cont.snbg {
  910. position: unset !important;
  911. }
  912. `,
  913. },
  914. {
  915. match: ["*://support.qq.com/*"],
  916. directLink: ["*://support.qq.com/*/link-jump?jump=*", "jump"],
  917. },
  918. {
  919. match: ["*://www.itbaoku.cn/*"],
  920. hide: [".qa-content-more"],
  921. expand: ["#qa-content"],
  922. },
  923. {
  924. // https://wukong.toutiao.com/question/6712757183118835972/
  925. match: ["*://*.toutiao.com/*"],
  926. hide: ["a.j-expand-showfull.expand-bottom", ".m-share-answer .neck .mask", ".float-openapp", ".expand-container .expand-button-wrapper"],
  927. expand: ["div.answer-text-full", "article.content", ".expand-container.folded"],
  928. },
  929. {
  930. match: ["*://www.bilibili.com/*"],
  931. hide: [".h5-download-bar", ".read-article-box .read-more .arrow-cnt", ".video-desc-container .toggle-btn"],
  932. expand: [".read-article-box.limit", ".video-desc-container .basic-desc-info"],
  933. js: () => {
  934. // 去掉复制的时候总是带上的尾巴
  935. let node = document.getElementById("article-content");
  936. if (node != null) {
  937. node.oncopy = function (e) {
  938. e.clipboardData.setData("text/plain", window.getSelection().toString());
  939. e.preventDefault();
  940. e.stopPropagation();
  941. e.stopImmediatePropagation();
  942. };
  943. }
  944. },
  945. },
  946. {
  947. match: ["*://m.bilibili.com/video/*"],
  948. hide: [".launch-app-btn.m-nav-openapp"],
  949. wait: [
  950. ["div.to-see", "click"]
  951. ]
  952. },
  953. {
  954. match: ["*://m.bilibili.com/*"],
  955. hide: [".opus-read-more"],
  956. expand: [".opus-module-content.limit"],
  957. },
  958. {
  959. match: ["*://ld246.com/*"],
  960. directLink: ["*://*ld246.com/forward?goto=*", "goto"],
  961. },
  962. {
  963. match: ["*://segmentfault.com/*"],
  964. directLink: [
  965. "*://link.segmentfault.com/?enc=*",
  966. (node) => {
  967. // segmentfault这东西也去加密了?
  968. if (/^https?:\/\//.test(node.innerText) && !node.innerText.endsWith("...")) {
  969. node.href = node.innerText;
  970. }
  971. },
  972. ],
  973. },
  974. // 暂时不用这功能
  975. // {
  976. // // https://cn.bing.com/search?form=MOZSBR&pc=MOZI&q=GIT_CLEAN_FLAGS
  977. // match: ["*://cn.bing.com/search?*"],
  978. // bindClick: [
  979. // "a[href^=http]",
  980. // (node, e) => {
  981. // if (node.target == "_blank" && !node.hostname.includes("bing.com")) {
  982. // e.stopPropagation();
  983. // }
  984. // },
  985. // ],
  986. // },
  987. {
  988. match: ["*://www.logonews.cn/*"],
  989. directLink: ["*://link.logonews.cn/?url=*", "url"],
  990. },
  991. {
  992. // https://m.meishichina.com/recipe/69477/
  993. match: ["*://m.meishichina.com/*"],
  994. hide: [".showmore_page_a"],
  995. expand: ["#showmorearticle"],
  996. },
  997. {
  998. match: ["*://www.sanzhima.com/*"],
  999. directLink: [
  1000. "*://www.sanzhima.com/jump.html?url=*",
  1001. (node) => {
  1002. let { url } = parseUrl(node.href);
  1003. if (url) {
  1004. node.href = atob(url);
  1005. node.setAttribute("target", "_blank");
  1006. }
  1007. },
  1008. ],
  1009. },
  1010. {
  1011. // https://www.ximalaya.com/sound/357093858
  1012. match: ["*://www.ximalaya.com/*", "*://m.ximalaya.com/*"],
  1013. hide: [".more-intro-wrapper.cY_", ".stretch-box .mask.ib_", "a.init-code.schema-link"],
  1014. expand: [".draft._Fc, .sound-intro .intro._Fc", ".stretch-box.ib_", ".album-intro .intro.Q_v"],
  1015. },
  1016. {
  1017. // https://auto.ifeng.com/c/8EK6RQbD5U2
  1018. // https://i.ifeng.com/c/8EJoQhvSkT3
  1019. // https://ihouse.ifeng.com/news/2022_03_12-55263044_0.shtml
  1020. match: "*://*.ifeng.com/*",
  1021. hide: ["section[class^='bottomSlide-']", "header[class^='headerIn-']", "div[class^='callupBtn-']", "div[class^='more-']", "div[class^='tip-']", "div.showall", "div[class^='more-1-']", "div[class^='bottom_box-'] > div[class^='box-']", "div[class^='containerBox-'] > div[class^='shadow-']", "[class^='index_shadow'] > [class^='index_unfoldIcon']"],
  1022. expand: ["div[class^='main_content-']", "section.article", "div[class^='containerBox-']", "div[class^='index_containerBox']"],
  1023. css: "#root>div[class^='main-'] {margin-bottom: unset !important;}",
  1024. },
  1025. {
  1026. // https://tieba.baidu.com/p/7412962296
  1027. // https://www.tieba.com/p/7745474371
  1028. match: ["*://tieba.baidu.com/*", "*://www.tieba.com/*"],
  1029. hide: [".appPromote", ".appBottomPromote", ".frs_daoliu_for_app", ".pb_cut_hot_recommend", ".father-cut-daoliu-normal-box", ".father-cut-daoliu-from-toutiao-box"],
  1030. directLink: [
  1031. "*://jump*.bdimg.com/safecheck/index?url=*",
  1032. (node) => {
  1033. if (/^https?:\/\//.test(node.innerText)) {
  1034. node.href = node.innerText;
  1035. }
  1036. },
  1037. ],
  1038. },
  1039. {
  1040. match: "*://mail.qq.com/*",
  1041. bindClick: [
  1042. "a[href^=http]",
  1043. (node, e) => {
  1044. if (node.target == "_blank" && !node.href.includes("mail.qq.com")) {
  1045. e.stopPropagation();
  1046. }
  1047. },
  1048. ],
  1049. },
  1050. {
  1051. // https://cloud.tencent.com/developer/article/1953552
  1052. match: "*://cloud.tencent.com/*",
  1053. hide: [".cdc-expand-area__toggle", ".com-markdown-collpase-hide .com-markdown-collpase-toggle", ".J-headerAdvertising", ".c-nav-advertising"],
  1054. expand: [".cdc-expand-area__main", ".com-markdown-collpase-hide .com-markdown-collpase-main"],
  1055. },
  1056. {
  1057. // https://developer.aliyun.com/article/875173
  1058. match: "*://developer.aliyun.com/*",
  1059. hide: ["#btn-readmore", ".article-hide-box"],
  1060. expand: [".article-hide-content"],
  1061. },
  1062. {
  1063. // http://www.360doc.com/content/20/0805/05/71057272_928578782.shtml
  1064. match: ["*://www.360doc.com/*", "*://www.360doc.cn/*"],
  1065. hide: [".article_showall"],
  1066. expand: ["#articlecontent", ".article_maxh"],
  1067. bindClick: [
  1068. "a[href^=http]",
  1069. (node, e) => {
  1070. if (node.target == "_blank" && !node.hostname.includes("360doc.com")) {
  1071. e.stopPropagation();
  1072. }
  1073. },
  1074. ],
  1075. },
  1076. {
  1077. // https://www.iteye.com/blog/agile-boy-274366
  1078. match: "*://www.iteye.com/blog/*",
  1079. hide: [".hide-article-box"],
  1080. expand: ["#blog_content"],
  1081. },
  1082. {
  1083. match: "*://www.423down.com/*",
  1084. directLink: [
  1085. "*://www.423down.com/go.php?url=*",
  1086. (node) => {
  1087. let { url } = parseUrl(node.href);
  1088. if (url) {
  1089. node.href = atob(url);
  1090. }
  1091. },
  1092. ],
  1093. },
  1094. {
  1095. // https://www.itdaan.com/blog/2019/08/06/1b407ea67c33df1c625ab657443ccd45.html
  1096. match: "*://www.itdaan.com/*",
  1097. js: () => {
  1098. if (!$.cookie("openid") || !$.cookie("loginCode")) {
  1099. $.cookie("openid", "1", { expires: 7 });
  1100. $.cookie("loginCode", "1", { expires: 7 });
  1101. }
  1102. if ($.cookie("vipuser") != "1") {
  1103. $.cookie("vipuser", "1", { expires: 7 });
  1104. }
  1105. },
  1106. directLink: [
  1107. "*://www.itdaan.com/link/*",
  1108. (node) => {
  1109. let url = node.href.split("/link/", 2)[1];
  1110. if (url) {
  1111. node.href = atob(url);
  1112. }
  1113. },
  1114. ],
  1115. },
  1116. {
  1117. match: "*://show.bookmarkearth.com/view/*",
  1118. js: () => {
  1119. let node = document.querySelector("p.link");
  1120. if (node) {
  1121. location.replace(node.innerText);
  1122. }
  1123. },
  1124. },
  1125. {
  1126. match: "*://www.shaduizi.com/*",
  1127. hide: [".content-container-open-btn"],
  1128. expand: [".content-section.content-section-container"],
  1129. },
  1130. {
  1131. match: "*://www.chinaz.com/*",
  1132. hide: [".contentPadding"],
  1133. expand: ["#article-content"],
  1134. },
  1135. {
  1136. match: "*://www.tianyancha.com/*",
  1137. bindClick: [
  1138. "a[href^=http]",
  1139. (node, e) => {
  1140. if (node.target == "_blank") {
  1141. e.stopPropagation();
  1142. }
  1143. },
  1144. ],
  1145. directLink: ["*://www.tianyancha.com/security?target=*", "target"],
  1146. },
  1147. {
  1148. match: "*://gitee.com/*",
  1149. directLink: ["*://gitee.com/link?target=*", "target"],
  1150. },
  1151. // {
  1152. // // 百度搜索移动端,该功能还有bug,免重定向跳转去掉,https://github.com/ViCrack/tempermonkey-script/issues/3#issuecomment-1507357746
  1153. // match: "*://m.baidu.com/*",
  1154. // bindClick: [
  1155. // "div.result",
  1156. // (node) => {
  1157. // if (node.dataset.log) {
  1158. // let link = JSON.parse(node.dataset.log).mu;
  1159. // node.querySelector("article").setAttribute("rl-link-href", link);
  1160. // }
  1161. // },
  1162. // ],
  1163. // },
  1164. {
  1165. match: "*://www.wxnmh.com/*",
  1166. hide: [".hide-article-box"],
  1167. expand: ["#message_content"],
  1168. },
  1169. {
  1170. match: "*://*.douban.com/*",
  1171. directLink: ["*.douban.com/link2/?url=*", "url"],
  1172. hide: [".oia-readall"],
  1173. expand: [".note-content"],
  1174. },
  1175. {
  1176. match: "*://wap.sogou.com/web/*",
  1177. directLink: ["*://wap.sogou.com/web/id=*&url=*", "url"],
  1178. },
  1179. {
  1180. match: "*://m.so.com/s?q=*",
  1181. directLink: ["*.so.com/jump?u=*", "u"],
  1182. },
  1183. {
  1184. match: "*://iswbm.com/*",
  1185. hide: ["#read-more-wrap"],
  1186. expand: ["#container"],
  1187. },
  1188. {
  1189. match: "*://www.oschina.net/*",
  1190. hide: ["div.collapse-bar"],
  1191. expand: ["div.article-detail"],
  1192. directLink: ["*://www.oschina.net/action/GoToLink?url=*", "url"],
  1193. },
  1194. {
  1195. match: "*://juejin.cn/post/*",
  1196. directLink: ["*link.juejin.cn/?target=*", "target"],
  1197. },
  1198. {
  1199. match: "*://www.3h3.com/soft/*",
  1200. hide: ["#showmore"],
  1201. expand: ["#ctext"],
  1202. },
  1203. {
  1204. match: "*://finance.sina.com.cn/*",
  1205. hide: ["#sina-cont000", "#sina-pages-u"],
  1206. },
  1207. {
  1208. // https://iask.sina.com.cn/b/new2COrHbarDpB.html
  1209. match: "*://*.sina.com.cn/*",
  1210. hide: [".detail-text-more", "#floating-image", ".answer-mask-box", ".answer-show-button"],
  1211. expand: [".new-pre-answer-text", ".knowledge-list-switch", ".detail-body"],
  1212. },
  1213. {
  1214. match: "*://*.py.cn/code/*",
  1215. start: () => {
  1216. unsafeWindow.IsLevelDate = 1;
  1217. Object.defineProperty(unsafeWindow, "IsLevelDate", {
  1218. get: function () {
  1219. return 1;
  1220. },
  1221. enumerable: true,
  1222. configurable: true,
  1223. });
  1224. Object.defineProperty(unsafeWindow, "is_login", {
  1225. get: function () {
  1226. return 1;
  1227. },
  1228. enumerable: true,
  1229. configurable: true,
  1230. });
  1231. },
  1232. },
  1233. {
  1234. match: "*://m.36kr.com/*",
  1235. hide: [".kr-mobile-goapp", ".article-goapp", ".float-app-button-wrp", ".article-top-swiper-goapp"],
  1236. expand: ["#body-content"],
  1237. },
  1238. {
  1239. match: ["*://m.imooc.com/*", "*://www.imooc.com/*"],
  1240. hide: [".wenda-more-wrap.js-wenda-more", "#js-appload", ".js-footer-appload", ".detail-content.long-content .showMore", ".hide-articel-box", ".js-show-reply-btn.hide-answer-morebtn"],
  1241. expand: ["#wap_wenda_detail", "#wenda_content", ".detail-content.long-content", "#js-qa-wenda", ".answer-content"],
  1242. },
  1243. {
  1244. match: "*://zhuanlan.zhihu.com/p/*",
  1245. hide: [".OpenInAppButton"],
  1246. css: `
  1247. [class^="css-"][href]{
  1248. display: block !important;
  1249. }
  1250. `,
  1251. directLink: ["*link.zhihu.com/?target=*", "target"],
  1252. },
  1253. {
  1254. match: "*://www.zhihu.com/question/*",
  1255. hide: [".OpenInAppButton", ".openInApp", ".DownloadGuide", ".Pc-feedAd-container", ".MobileAppHeader-downloadLink", ".ContentItem-expandButton", ".AdBelowMoreAnswers", ".MBannerAd"],
  1256. expand: [".RichContent-inner--collapsed", ".RichContent-inner"],
  1257. wait: [
  1258. [".ModalExp-modalShow", (node) => ((node.parentNode.style.display = "none"), document.body.classList.remove("ModalWrap-body"))],
  1259. [
  1260. ".is-collapsed",
  1261. (node) => {
  1262. node.classList.remove("is-collapsed");
  1263. },
  1264. ],
  1265. ],
  1266. directLink: ["*link.zhihu.com/?target=*", "target"],
  1267. css: `
  1268. .RichContent--unescapable.is-collapsed .RichContent-inner {
  1269. -webkit-mask-image: unset !important;
  1270. mask-image: unset !important;
  1271. }
  1272. .RichContent.is-collapsed {
  1273. cursor: unset !important;
  1274. }
  1275. .RichContent-inner {
  1276. margin-bottom: 40px !important;
  1277. }
  1278. `,
  1279. },
  1280. {
  1281. match: "*://www.cnbeta.com/articles/*",
  1282. hide: ["div[style='display:block !important;position:fixed;bottom:0;margin-top:10px;width:100%;background:#c44;color:#fff;font-size:15px;z-index:99999']"],
  1283. },
  1284. {
  1285. match: "*://xw.qq.com/cmsid/*",
  1286. hide: [".collapseWrapper", ".redbag.item"],
  1287. expand: ["#article_body"],
  1288. },
  1289. {
  1290. // https://xw.qq.com/amphtml/20220222A03ZFF00
  1291. match: "*://xw.qq.com/amphtml/*",
  1292. hide: ["div.ct-unfold"],
  1293. expand: [".article-main.fold"],
  1294. },
  1295. {
  1296. match: "*://xuedingmiao.com/*",
  1297. hide: ["#read-more-wrap"],
  1298. expand: ["#main-content"],
  1299. },
  1300. {
  1301. match: "*://blog.51cto.com/*",
  1302. js: () => {
  1303. safeWaitJQuery(() => {
  1304.  
  1305. jQuery(function () {
  1306. $(".copy_btn").removeClass("disable");
  1307. $(".copy_btn").text("免登录复制");
  1308. $(".article-content-wrap").unbind("copy");
  1309. if ("undefined" == typeof unsafeWindow.uid || !unsafeWindow.uid) {
  1310. unsafeWindow.uid = 1;
  1311. }
  1312. $("body")
  1313. .off()
  1314. .on("click", ".copy_btn", function (e) {
  1315. e.stopPropagation();
  1316. e.preventDefault();
  1317. let $this = $(this);
  1318. let text = $(this).parents(".hljs-cto").find("pre").find('[class*="language-"]')[0].textContent;
  1319. copy(text).then(
  1320. () => {
  1321. $this.text("已复制");
  1322. setTimeout(function () {
  1323. $this.text("免登录复制");
  1324. }, 2000);
  1325. },
  1326. (e) => {
  1327. $this.text("复制失败:" + e);
  1328. setTimeout(function () {
  1329. $this.text("免登录复制");
  1330. }, 2000);
  1331. }
  1332. );
  1333. return false;
  1334. });
  1335. });
  1336. });
  1337. },
  1338. },
  1339. {
  1340. match: "*://wap.peopleapp.com/article/*",
  1341. hide: [".read-more"],
  1342. expand: [".article-wrapper.has-more-high"],
  1343. },
  1344. {
  1345. match: "*://baike.baidu.com/item/*",
  1346. wait: [
  1347. [
  1348. // 需要循环?
  1349. ".yx-load-more-inner.J-yx-load-moreContent",
  1350. (node) => {
  1351. node.dispatchEvent(new Event("tap"));
  1352. document.getElementById("ui_refresh_down").style.display = "none";
  1353. return false;
  1354. },
  1355. ],
  1356. ],
  1357. },
  1358. {
  1359. match: ["*://m.jb51.cc/*", "*://www.jb51.cc/*"],
  1360. hide: ["#read-more-wrap"],
  1361. expand: ["#container"],
  1362. },
  1363. {
  1364. match: ["*://www.yiidian.com/*", "*://yiidian.com/*"],
  1365. hide: ["#read-more-wrap"],
  1366. expand: ["#yArticle"],
  1367. },
  1368. {
  1369. match: "*://bbs.elecfans.com/m/*",
  1370. hide: [".conMore", ".login-reg-fixed"],
  1371. expand: [".postListCon"],
  1372. },
  1373. {
  1374. match: ["*://www.elecfans.com/*", "*://m.elecfans.com/*"],
  1375. hide: [".seeHide_new_login", ".open_app.open_app_fixed", ".login-reg-fixed", ".seeHide"],
  1376. expand: [".article_content", ".simditor-body"],
  1377. },
  1378. {
  1379. match: "*://www.bandbbs.cn/threads/*",
  1380. hide: [".bbCodeBlock-expandLink.js-expandLink"],
  1381. wait: [[".js-expandWatch:not(.is-expanded)", (node) => node.classList.add("is-expanded")]],
  1382. },
  1383. {
  1384. match: "*://chejiahao.m.autohome.com.cn/info/*",
  1385. hide: ["#continue_reading"],
  1386. expand: [".major-long-details"],
  1387. wait: [[".pgc-details .fn-hide", (node) => node.classList.remove("fn-hide")]],
  1388. },
  1389. {
  1390. match: "*://www.bjtzdbzz.com/*",
  1391. hide: [".pc-request-btn", ".mb-request-btn"],
  1392. expand: [".detail-content-desc-show"],
  1393. },
  1394. {
  1395. match: "*://m.21jingji.com/article/*",
  1396. hide: [".content .mask"],
  1397. expand: [".txtContent"],
  1398. },
  1399. {
  1400. // https://zhidao.baidu.com/question/423275263.html
  1401. match: "*://zhidao.baidu.com/question/*",
  1402. hide: [".w-detail-display-btn-text", ".wgt-best-mask", ".wgt-answers-mask", ".wgt-question-desc-action", ".w-reply-text .unfold", "div.wgt-target .target-text .wgt-target-mask"],
  1403. expand: [".w-detail-container.w-detail-index", "div[id^=best-content-]", "div[id^=answer-content-]", ".wgt-question-desc-inner", ".w-reply-text", "div.wgt-target .target-text", ".w-detail-container.w-detail-single"],
  1404. wait: [
  1405. ["#show-answer-hide", (node) => {
  1406. node.dispatchEvent(new Event("click"));
  1407. }]
  1408. ],
  1409. },
  1410. {
  1411. match: "*://haokan.baidu.com/v*",
  1412. hide: [".share-origin.wx-share-launch", ".player-pause-code-bottom-text", ".player-pause-code-inner"],
  1413. },
  1414. {
  1415. match: "*://www.xz577.com/*",
  1416. hide: [".article-content-body-more1"],
  1417. expand: [".con2"],
  1418. },
  1419. {
  1420. match: "*://www.it1352.com/*",
  1421. hide: [".arc-body-main-more"],
  1422. expand: [".arc-body-main"],
  1423. js: () => {
  1424. $.cookie("olduser", "1", {
  1425. domain: "it1352.com",
  1426. expires: 1500,
  1427. });
  1428. },
  1429. },
  1430. {
  1431. match: "*://g.pconline.com.cn/*",
  1432. hide: [".btnForAppOpenA", ".btnForAppOpenImg", ".add_artilce_handle", ".WakeUptop"],
  1433. expand: [".art-content"],
  1434. },
  1435. {
  1436. match: "*://3w.huanqiu.com/*",
  1437. hide: ["#more"],
  1438. expand: ["#content"],
  1439. },
  1440. {
  1441. match: ["*://m.huanqiu.com/*"],
  1442. hide: [".unfold-btn"],
  1443. expand: [".article-content", ".article .content"],
  1444. start: () => {
  1445. Element.prototype._attachShadow = Element.prototype.attachShadow;
  1446. Element.prototype.attachShadow = function () {
  1447. let css = `
  1448. .unfold-btn
  1449. {
  1450. display: none !important;
  1451. visibility:hidden !important;
  1452. max-height: 0 !important;
  1453. max-width: 0 !important;
  1454. height: 0 !important;
  1455. width: 0 !important;
  1456. }
  1457.  
  1458. .article-content, .article .content
  1459. {
  1460. height: auto !important;
  1461. max-height: unset !important;
  1462. overflow: unset !important;
  1463. -webkit-line-clamp: unset !important;
  1464. }
  1465. `;
  1466. let style = document.createElement("style");
  1467. style.type = "text/css";
  1468. try {
  1469. style.innerHTML = css;
  1470. } catch (x) {
  1471. style.innerText = css;
  1472. }
  1473. let shadow = this._attachShadow({ mode: "open" });
  1474. shadow.appendChild(style);
  1475. return shadow;
  1476. };
  1477. },
  1478. wait: [
  1479. [
  1480. ".unfold-btn",
  1481. (node) => {
  1482. node.dispatchEvent(new Event("click"));
  1483. node.dispatchEvent(new Event("tap"));
  1484. },
  1485. ],
  1486. ],
  1487. },
  1488. {
  1489. match: "*://iknow.lenovo.com.cn/*",
  1490. hide: [".coverQRCode"],
  1491. js: () => {
  1492. localStorage.setItem("scanQRCode", "1");
  1493. $(document).off("scroll.unable");
  1494. },
  1495. },
  1496. {
  1497. // https://www.jianshu.com/p/e7dc41b6ea54
  1498. match: "*://www.jianshu.com/p/*",
  1499. hide: [".download-app-guidance", ".call-app-btn", "#jianshu-header", "#note-show .content .show-content-free .collapse-tips", ".download", ".note-comment-above-ad-wrap", ".close-collapse-btn", ".open-app-btn", ".app-open", "#guangtui", "#fixed-ad-container", ".fubiao-dialog"],
  1500. expand: ["#note-show .content .show-content-free .collapse-free-content"],
  1501. directLink: ["*://link.jianshu.com/?t=*", "t", "*://links.jianshu.com/go?to=*", "to"],
  1502. },
  1503. {
  1504. // 百度新闻, 百家号
  1505. match: ["*://baijiahao.baidu.com/s*", "*://ext.baidu.com/api/comment/v1/page/list*", "*://mbd.baidu.com/newspage/*", "*://www.baidu.com/#iact=wiseindex/tabs/news/activity/newsdetail=*"],
  1506. hide: [".packupButton", ".oPadding", ".newUnfoldFullBox.contentPadding", ".undefined", ".foldMaskWrapper", "#headDeflectorContainer"],
  1507. expand: [".mainContent", "#mainContentContainer"],
  1508. wait: [
  1509. ["p:contains('百度APP内阅读')", (node) => node.parentNode.parentNode.removeChild(node.parentNode)],
  1510. [".layer-content.layer-content-shown", (node) => node.querySelector(".layer-itemBtn.normal").dispatchEvent(new Event("click"))],
  1511. ],
  1512. },
  1513. {
  1514. match: ["*://download.csdn.net/download/*"],
  1515. js: () => {
  1516. let btn = $(".more-wrap").find(".el-button");
  1517. btn.removeAttr("data-report-click");
  1518. btn.click()
  1519. $("#desc-text").prop("checked", true);
  1520. }
  1521. },
  1522. {
  1523. match: ["*://gitcode.csdn.net/*"],
  1524. hide: [".article-show-more", ".article-detail .user-desc-fix", ".content-ai"],
  1525. expand: [".article-detail .main-content .user-article-hide"],
  1526. },
  1527. {
  1528. match: ["*://wenku.csdn.net/*"],
  1529. hide: [".article-box .cont .open", ".article-box .vip", ".article-box pre code .lowerBox"],
  1530. expand: [".article-box .cont.first-show", ".markdown_views .hljs"],
  1531. },
  1532. {
  1533. // https://huaweicloud.csdn.net/657c0ecddafaf23eeaee29b9.html
  1534. match: ["*://huaweicloud.csdn.net/*", "*://openatomworkshop.csdn.net/*"],
  1535. hide: [".article-detail .main-content .user-article-hide .article-show-more", ".article-detail .user-desc-fix"],
  1536. expand: [".article-detail .main-content", ".article-detail .main-content .user-article-hide"],
  1537. },
  1538. {
  1539. // https://ask.csdn.net/questions/8082390/54571405
  1540. match: ["*://ask.csdn.net/*"],
  1541. hide: [".expandBtn"],
  1542. expand: [".ask-issue-content"],
  1543. js: () => {
  1544. $('.answer-more').click();
  1545. }
  1546. },
  1547. {
  1548. match: "*://blog.csdn.net/*",
  1549. hide: [".weixin-shadowbox.wap-shadowbox", ".aside-header-fixed", ".hide-preCode-box", "#m_toolbar_left .m_toolbar_left_app_btn", ".readall_box", ".feed-Sign-span", ".btn_mod", ".btn_app_link", ".btn-readmore", ".comment_read_more_box", ".btn_open_app_prompt_div", ".feed-Sign-weixin"],
  1550. expand: [".article_content", "#article_content", "#comment", ".set-code-hide"],
  1551. directLink: ["*://link.csdn.net/?target=*", "target"],
  1552. bindClick: [
  1553. "a[href^=http]",
  1554. (node, e) => {
  1555. if (node.target == "_blank" && !node.hostname.includes(".csdn.net")) {
  1556. e.stopPropagation();
  1557. }
  1558. },
  1559. ],
  1560. // https://greasyfork.org/zh-CN/scripts/440400-%E8%87%AA%E5%8A%A8%E5%B1%95%E5%BC%80%E5%85%A8%E6%96%87%E9%98%85%E8%AF%BB%E6%9B%B4%E5%A4%9A/discussions/224754
  1561. css: `
  1562. #content_views,code,pre {
  1563. -webkit-touch-callout: auto !important;
  1564. -webkit-user-select: auto !important;
  1565. -khtml-user-select: auto !important;
  1566. -moz-user-select: auto !important;
  1567. -ms-user-select: auto !important;
  1568. user-select: auto !important;
  1569. }
  1570. main div.blog-content-box pre {
  1571. max-height: unset;
  1572. overflow-y: unset;
  1573. }
  1574. `,
  1575. js: () => {
  1576. safeWaitJQuery(() => {
  1577. jQuery(function () {
  1578. jQuery(function () {
  1579. jQuery(".recommend-jump-app").removeAttr("id");
  1580. jQuery(".recommend-jump-app")
  1581. .off("click")
  1582. .on("click", (e) => {
  1583. let url = jQuery(this).find("a.flag").attr("href");
  1584. if (url) {
  1585. location.href = url;
  1586. }
  1587. });
  1588. jQuery("a[data-report-click]").removeAttr("data-report-click");
  1589. jQuery("a[data-report-query]").removeAttr("data-report-query");
  1590. if (typeof unsafeWindow.csdn != "undefined") {
  1591. // https://github.com/adlered/CSDNGreener
  1592. jQuery("code").attr("onclick", "mdcp.copyCode(event)");
  1593. try {
  1594. unsafeWindow.csdn.copyright.init("", "", "");
  1595. } catch (err) { }
  1596. try {
  1597. Object.defineProperty(unsafeWindow.csdn.report, "reportClick", {
  1598. value: function () {
  1599. return true;
  1600. },
  1601. writable: false,
  1602. configurable: false,
  1603. });
  1604. } catch (err) { }
  1605. try {
  1606. Object.defineProperty(unsafeWindow, "articleType", {
  1607. value: 0,
  1608. writable: false,
  1609. configurable: false,
  1610. });
  1611. } catch (err) { }
  1612. }
  1613. });
  1614. });
  1615. });
  1616. },
  1617. },
  1618. {
  1619. match: "*://jingyan.baidu.com/article/*",
  1620. hide: [".read-whole-mask"],
  1621. expand: [".exp-content-container"],
  1622. },
  1623. ];
  1624.  
  1625. function matchRule(str, rule) {
  1626. var escapeRegex = (str) => str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
  1627. return new RegExp("^" + rule.split("*").map(escapeRegex).join(".*") + "$").test(str);
  1628. }
  1629.  
  1630. // https://greasyfork.org/zh-CN/scripts/416338
  1631. function parseUrl(href) {
  1632. if (!href) return {};
  1633. let search;
  1634.  
  1635. try {
  1636. // 链接
  1637. const url = new URL(href);
  1638. ({ search } = url); // 主要处理对hash的search
  1639.  
  1640. if (!search && url.hash.includes("?")) {
  1641. search = url.hash.split("?")[1];
  1642. }
  1643. } catch (err) {
  1644. // 非链接,如:a=1&b=2、?a=1、/foo?a=1、/foo#bar?a=1
  1645. if (href.includes("?")) {
  1646. search = href.split("?")[1];
  1647. } else {
  1648. search = href;
  1649. }
  1650. }
  1651.  
  1652. const searchParams = new URLSearchParams(search);
  1653. return [...searchParams.entries()].reduce((acc, [key, value]) => ((acc[key] = value), acc), {});
  1654. }
  1655.  
  1656. function randomString(length, chars) {
  1657. let result = "";
  1658. for (let i = length; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)];
  1659. return result;
  1660. }
  1661.  
  1662. function setCookie(name, value, days) {
  1663. let expires = "";
  1664. if (days) {
  1665. let date = new Date();
  1666. date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
  1667. expires = "; expires=" + date.toUTCString();
  1668. }
  1669. document.cookie = name + "=" + (value || "") + expires + "; path=/";
  1670. }
  1671.  
  1672. function getCookie(name) {
  1673. let nameEQ = name + "=";
  1674. let ca = document.cookie.split(";");
  1675. for (let i = 0; i < ca.length; i++) {
  1676. let c = ca[i];
  1677. while (c.charAt(0) == " ") c = c.substring(1, c.length);
  1678. if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
  1679. }
  1680. return null;
  1681. }
  1682.  
  1683. function eraseCookie(name) {
  1684. document.cookie = name + "=; Max-Age=-99999999;";
  1685. }
  1686.  
  1687. function clearAdLoop() {
  1688. let id = setTimeout(";");
  1689. for (let i = 0; i < id; i++) {
  1690. clearTimeout(i);
  1691. }
  1692. id = setInterval(";");
  1693. for (let i = 0; i < id; i++) {
  1694. clearInterval(i);
  1695. }
  1696. }
  1697.  
  1698. function safeWaitJQuery(callbackFunc) {
  1699. let jQueryTimer = setInterval(function () {
  1700. if (typeof jQuery !== "undefined") {
  1701. clearInterval(jQueryTimer);
  1702. callbackFunc(jQuery);
  1703. }
  1704. }, 300);
  1705. }
  1706.  
  1707.  
  1708. function nativeCopy(value) {
  1709. return new Promise((resolve, reject) => {
  1710. let textArea = document.createElement("textarea");
  1711. textArea.value = value;
  1712. textArea.style.top = "0";
  1713. textArea.style.left = "0";
  1714. textArea.style.position = "fixed";
  1715. document.body.appendChild(textArea);
  1716. textArea.focus();
  1717. textArea.select();
  1718. try {
  1719. document.execCommand("copy");
  1720. setTimeout(() => {
  1721. resolve(value);
  1722. }, 1);
  1723. } catch (e) {
  1724. setTimeout(() => {
  1725. reject(e);
  1726. }, 1);
  1727. }
  1728. document.body.removeChild(textArea);
  1729. });
  1730. }
  1731.  
  1732. function copy(value) {
  1733. return new Promise((resolve, reject) => {
  1734. navigator.clipboard
  1735. ? navigator.clipboard.writeText(value).then(resolve, function () {
  1736. nativeCopy(text).then(resolve, reject);
  1737. })
  1738. : nativeCopy(text).then(resolve, reject);
  1739. });
  1740. }
  1741.  
  1742. function querySelectorIncludesText(selector, text) {
  1743. return Array.from(document.querySelectorAll(selector)).filter((el) => el.textContent.includes(text));
  1744. }
  1745.  
  1746. // https://github.com/Shawak/TwitchSquad/blob/main/twitchsquad.user.js
  1747. if (typeof GM_addStyle === "undefined") {
  1748. GM_addStyle = function (css) {
  1749. let head = document.getElementsByTagName("head")[0],
  1750. style = document.createElement("style");
  1751. if (!head) {
  1752. return;
  1753. }
  1754. style.type = "text/css";
  1755. try {
  1756. style.innerHTML = css;
  1757. } catch (x) {
  1758. style.innerText = css;
  1759. }
  1760. head.appendChild(style);
  1761. };
  1762. }
  1763. if (typeof unsafeWindow == "undefined") unsafeWindow = window;
  1764.  
  1765. const readyName = randomString(8, "abcdefghijklmnopqrstuvwxyz");
  1766.  
  1767. // https://greasyfork.org/zh-CN/scripts/28497
  1768. var EventTarget_addEventListener = EventTarget.prototype.addEventListener;
  1769. var document_addEventListener = document.addEventListener;
  1770. var Event_preventDefault = Event.prototype.preventDefault;
  1771.  
  1772.  
  1773. for (var website of websites) {
  1774. let hit = false;
  1775. if (Array.isArray(website.match)) {
  1776. hit = website.match.some((s) => matchRule(window.location.href, s));
  1777. } else {
  1778. hit = matchRule(window.location.href, website.match);
  1779. }
  1780.  
  1781. if (hit) {
  1782. console.log(website);
  1783. let style = "";
  1784. if ("hide" in website && website.hide.length > 0) {
  1785. style +=
  1786. website.hide.join(",\n") +
  1787. `
  1788. {
  1789. display: none !important;
  1790. visibility:hidden !important;
  1791. max-height: 0 !important;
  1792. max-width: 0 !important;
  1793. height: 0 !important;
  1794. width: 0 !important;
  1795. }
  1796.  
  1797. `;
  1798. }
  1799. if ("expand" in website && website.expand.length > 0) {
  1800. style +=
  1801. website.expand.join(",\n") +
  1802. `
  1803. {
  1804. height: auto !important;
  1805. max-height: unset !important;
  1806. overflow: unset !important;
  1807. -webkit-line-clamp: unset !important;
  1808. }
  1809.  
  1810. `;
  1811. }
  1812. if ("disable" in website && website.disable.length > 0) {
  1813. style +=
  1814. website.disable.join(",\n") +
  1815. `
  1816. {
  1817. pointer-events: none !important;
  1818. }
  1819.  
  1820. `;
  1821. }
  1822. if ("css" in website && website.css.length > 0) {
  1823. style += website.css;
  1824. }
  1825. GM_addStyle(style);
  1826.  
  1827. if ("wait" in website) {
  1828. // TODO 需要换种方式优化
  1829. let ready = [];
  1830. let id = setInterval(() => {
  1831. try {
  1832. for (let w of website.wait) {
  1833. if (!(w[0] in ready)) {
  1834. let nodeList;
  1835. let m = w[0].match(/(.+?):contains\(\s*['"](.+?)['"]\s*\)/);
  1836. if (m) {
  1837. nodeList = querySelectorIncludesText(m[1], m[2]);
  1838. } else {
  1839. nodeList = document.querySelectorAll(w[0]);
  1840. }
  1841. let allNodeFinish = nodeList.length > 0;
  1842. nodeList.forEach((node) => {
  1843. if (!node.dataset[readyName]) {
  1844. if (w[1] === "click") {
  1845. node.dispatchEvent(new Event("click"));
  1846. node.dispatchEvent(new Event("tap"));
  1847. node.click();
  1848. } else {
  1849. let callret = w[1].call(node, node); // 返回值
  1850. if (callret === false) {
  1851. allNodeFinish = false;
  1852. return;
  1853. }
  1854. }
  1855. node.dataset[readyName] = true;
  1856. }
  1857. });
  1858. if (allNodeFinish) {
  1859. ready.push(w[0]);
  1860. }
  1861. }
  1862. }
  1863. if (ready.length == website.wait.length) {
  1864. clearInterval(id);
  1865. }
  1866. } catch (x) {
  1867. clearInterval(id);
  1868. }
  1869. }, 1000);
  1870. }
  1871.  
  1872. if ("directLink" in website) {
  1873. // 去除链接重定向
  1874.  
  1875. // 支持鼠标左右键和拖拽打开超链接
  1876. document.addEventListener(
  1877. "mousedown",
  1878. (e) => {
  1879. // https://greasyfork.org/zh-CN/scripts/20431-zhihu-link-redirect-fix
  1880. let dom = e.target;
  1881. let target = dom.closest("a[href]");
  1882. if (target) {
  1883. let d = website.directLink;
  1884. for (let i = 0; i < d.length; i += 2) {
  1885. if (matchRule(target.href, d[i])) {
  1886. if (typeof d[i + 1] === "function") {
  1887. d[i + 1].call(target, target);
  1888. } else {
  1889. let param = parseUrl(target.href);
  1890. if (param[d[i + 1]]) {
  1891. target.href = param[d[i + 1]];
  1892. }
  1893. }
  1894. // 避免泄露来源, 加强隐私保护
  1895. if (target.target == "_blank") {
  1896. let rel = target.getAttribute("rel");
  1897. if (rel != null) {
  1898. if (!rel.includes("noreferrer")) {
  1899. target.setAttribute("rel", rel + " noreferrer");
  1900. }
  1901. } else {
  1902. target.setAttribute("rel", "noreferrer");
  1903. }
  1904. }
  1905. }
  1906. }
  1907. }
  1908. },
  1909. true
  1910. );
  1911. }
  1912.  
  1913. if ("bindClick" in website) {
  1914. document.addEventListener(
  1915. "click",
  1916. (e) => {
  1917. let dom = e.target;
  1918. let d = website.bindClick;
  1919. let target = dom.closest(d[0]);
  1920. if (target) {
  1921. d[1].call(target, target, e);
  1922. }
  1923. },
  1924. true
  1925. );
  1926. }
  1927.  
  1928. if ("start" in website) {
  1929. website.start();
  1930. }
  1931.  
  1932. if ("js" in website) {
  1933. if (document.readyState == "complete") {
  1934. website.js();
  1935. // alert("程序出现异常");
  1936. // GM_openInTab("https://greasyfork.org/zh-CN/scripts/440400/feedback");
  1937. } else {
  1938. document.addEventListener("DOMContentLoaded", website.js);
  1939. }
  1940. }
  1941.  
  1942. if ('hookEvent' in website) {
  1943.  
  1944. function addEventListener(type, func, useCapture) {
  1945. var _addEventListener = this === document ? document_addEventListener : EventTarget_addEventListener;
  1946. if (typeof obj === 'function' && website.hookEvent(type, func, useCapture)) {
  1947. return true
  1948. } else if (website.hookEvent.includes(type)) {
  1949. return true
  1950. } else {
  1951. _addEventListener.apply(this, arguments);
  1952. }
  1953. }
  1954.  
  1955. EventTarget.prototype.addEventListener = addEventListener;
  1956. document.addEventListener = addEventListener;
  1957.  
  1958. var frames = document.querySelectorAll("frame")
  1959. if (frames) {
  1960. for (let i = 0; i < frames.length; i++) {
  1961. frames[i].contentWindow.document.addEventListener = addEventListener;
  1962. }
  1963. }
  1964.  
  1965. document.addEventListener("DOMContentLoaded", function () {
  1966. var frames = document.querySelectorAll("frame")
  1967. if (frames) {
  1968. for (let i = 0; i < frames.length; i++) {
  1969. frames[i].contentWindow.document.addEventListener = addEventListener;
  1970. }
  1971. }
  1972. });
  1973. }
  1974.  
  1975. break;
  1976. }
  1977. }
  1978. })();