自动展开

自动展开文档 隐藏部分;长期维护、PC+手机全平台支持;全平台支持:CSDN、it1352、编程之家、简书、知乎、百家号、百度资讯、百度经验、百度知道、百度贴吧、百度新闻、新浪新闻、腾讯新闻、搜狐新闻、网易新闻、凤凰新闻、澎湃新闻、澎湃新闻、新京报、环球网、日民日报、人民网、36氪、果壳、虎扑、虎嗅、头条、B站专栏、微博文章、豆瓣文章、开源中国、360图书馆、太平洋电脑网、中关村在线、汽车之家、游侠网

目前為 2022-12-29 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name 自动展开
  3. // @version 1.3.30
  4. // @namespace https://github.com/AirBashX/AutoUnfold/
  5. // @homepage https://github.com/AirBashX/UserScript
  6. // @author airbash
  7. // @description 自动展开文档 隐藏部分;长期维护、PC+手机全平台支持;全平台支持:CSDN、it1352、编程之家、简书、知乎、百家号、百度资讯、百度经验、百度知道、百度贴吧、百度新闻、新浪新闻、腾讯新闻、搜狐新闻、网易新闻、凤凰新闻、澎湃新闻、澎湃新闻、新京报、环球网、日民日报、人民网、36氪、果壳、虎扑、虎嗅、头条、B站专栏、微博文章、豆瓣文章、开源中国、360图书馆、太平洋电脑网、中关村在线、汽车之家、游侠网
  8. // @match *://*.jianshu.com/*
  9. // @match *://*.blog.csdn.net/*
  10. // @match *://blog.csdn.net/*
  11. // @match *://ask.csdn.net/questions/*
  12. // @match *://*.it1352.com/*
  13. // @match *://*.jb51.cc/*
  14. // @match *://www.zhihu.com/question/*
  15. // @match *://jingyan.baidu.com/article*
  16. // @match *://zhidao.baidu.com/question*
  17. // @match *://baike.baidu.com/item/*
  18. // @match *://tieba.baidu.com/p*
  19. // @match *://wk.baidu.com/view/*
  20. // @match *://tanbi.baidu.com/h5apptopic/browse/*
  21. // @match *://baijiahao.baidu.com/s*
  22. // @match *://mbd.baidu.com/newspage/data/*
  23. // @match *://news.baidu.com/news*
  24. // @match *://m.baidu.com/sf_baijiahao/*
  25. // @match *://*.sina.cn/*
  26. // @match *://3g.163.com/*
  27. // @match *://*.sohu.com/a/*
  28. // @match *://view.inews.qq.com/*
  29. // @match *://*.ifeng.com/*
  30. // @match *://m.thepaper.cn/newsDetail_forward*
  31. // @match *://m.bjnews.com.cn/detail/*
  32. // @match *://*.huanqiu.com/article/*
  33. // @match *://3w.huanqiu.com/a/*
  34. // @match *://3g.dxy.cn/*
  35. // @match *://www.bilibili.com/read/mobile*
  36. // @match *://weibo.com/ttarticle/p/show?id=*
  37. // @match *://m.douban.com/group/topic/197415364/*
  38. // @match *://card.weibo.com/article/m/show/id*
  39. // @match *://www.oschina.net/p/*
  40. // @match *://www.360doc.cn/article/*
  41. // @match *://www.360doc.com/content/*
  42. // @match *://g.pconline.com.cn/x/*
  43. // @match *://m.zol.com.cn/article/*
  44. // @match *://m.autohome.com.cn/*
  45. // @match *://chejiahao.m.autohome.com.cn/info/*
  46. // @match *://3g.ali213.net/*
  47. // @match *://blog.didispace.com/*
  48. // @match *://*.wang1314.com/doc/*
  49. // @match *://*.k4china.com/*
  50. // @match *://www.tofacebook.com/*
  51. // @run-at document-body
  52. // @icon data:image/png;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAA29JREFUeF7tmMvrT08Yx1/fnViwVcq/gqKQa8gtd0Kyk8Vv81tZKWGByC233JWIwp9iYcPORkT56fl1po5pnjNn5syc6dOZz/Iz1/dr3s9z5pk5Jv6bm7h+KoDqgIkTqCEwcQPUJFhDoIbAxAnUEJi4AepXoIZADYGJE4gJgSPAF+BFYXYngU/AsyH7CAUg4s8B84GNBSGI+DPAAmDzEAghANriDfS9wO0hJxAx9iBwvhFvhu8HbkbM1fsz6BJfAoJL/CAIfRzQJX5MCF3ioyH4AOwGrjQxbxb5Cixy2G0fcCvGhj3GuMS79vEfIH1v9Jjz/y5dADTx/wCfgScjQdDE/wt8dCTiIAgaAE38MeBBI1yyrw3hN3AgoRO2A9eshCcnfwK42+xjvQJBxj70OcEFQMRftGz+C5BcYGfanBD6iDf6DgFXLbHihG3A4y4ILgBbgEeOQWuA147/VwFvrP/FCbK4K0x8hyLtmnj53D13TCD9LwMLW23fAclLnS7QQmCDspAGYRdwJxEEifmzlgN/AiL+npJ35HLWTsy9xPuS4A5lwVAI0t92iOaCUcX7AEh7qBPEivcdTlgHvPJ435Xtu07+aHMtnxdq+/Y+fPcA6RuaEzQIq4G3CoQi4vs4wOx3GfAhIDEuB947nOCCECpeEtslYNDJm731cYDp6xIlbVpOWAG880AoKj7EAUbHWuClwwlble+tC4IMl1J6aaukNVNKzMsJ23lE2pPEvL33EAfEQlipxP4364Y3uvgYB/ggHG6urjZoDYLpJ9fb4wEnL/1PKWt5PjZ/N8c4IDWELvGuhJdM/BAHxELYBDxtnUFR8SkAyBxaYtypWNpAKC4+FQCZZ49SAmsQpIpcAlxwBKzY3nW3P91UqUEx7us8JAfYc2sQQl6PNfHyDpHltSklgC4n9IEgoXHdUdVlE58yBNpukEuRqwbXbowyVuoHud5GlbQ+m3e1p3aAWSukitRs733MGCLcjM0FQObv855QVHyuEGgfTJcTpBaQbJ+kqot1Q04HmD1p7wk/SosfwwEGgvaeYNp7v+HFnrQ2bgwHmLW194Ri4sd0gFY7FBVfAkC7diguvhQAA2Fxinp+aE4YMwcM3WuW8RVAFqwzNGl1wAwdVpatVgdkwTpDk1YHzNBhZdlqdUAWrDM06eQd8Acza/FB2qWb3AAAAABJRU5ErkJggg==
  53. // @grant none
  54. // @license GPL-3.0
  55. // ==/UserScript==
  56. (function () {
  57. "use strict";
  58.  
  59. /**
  60. * 网站列表
  61. * @type {name/url/操作类型}
  62. */
  63. const websites = [
  64. {
  65. name: "CSDN",
  66. url: "blog.csdn.net",
  67. handles: [
  68. //PC端:自动展开代码块
  69. {
  70. type: "click",
  71. item: ".hide-preCode-bt",
  72. },
  73. //PC端:关注博主即可阅读全文
  74. {
  75. type: "display",
  76. item: ".hide-article-box",
  77. },
  78. //下载弹窗
  79. {
  80. type: "display",
  81. item: ".weixin-shadowbox",
  82. },
  83. //阅读全文
  84. {
  85. type: "display",
  86. item: ".btn_mod",
  87. },
  88. {
  89. type: "height",
  90. item: ".article_content",
  91. },
  92. {
  93. type: "display",
  94. item: ".readall_box",
  95. },
  96. //展开评论
  97. {
  98. type: "click",
  99. item: ".btn_comment_readmore",
  100. },
  101. ],
  102. },
  103. {
  104. name: "CSDN问答",
  105. url: "ask.csdn.net/questions",
  106. handles: [
  107. //PC端:展开全部
  108. {
  109. type: "display",
  110. item: ".expandBtn",
  111. },
  112. {
  113. type: "height",
  114. item: ".normal-style",
  115. },
  116. //PC端:查看等多回答
  117. {
  118. type: "click",
  119. item: ".ic_ask_down_reeow",
  120. },
  121. ],
  122. },
  123. {
  124. name: "it1352",
  125. url: "it1352.com",
  126. handles: [
  127. //PC端:查看全文:解除公众号限制
  128. {
  129. type: "display",
  130. item: ".arc-body-main-more",
  131. },
  132. {
  133. type: "height",
  134. item: ".arc-body-main",
  135. },
  136. ],
  137. },
  138. {
  139. name: "编程之家",
  140. url: "jb51.cc",
  141. handles: [
  142. //PC端:阅读全文
  143. {
  144. type: "display",
  145. item: "#read-more-wrap",
  146. },
  147. {
  148. type: "height",
  149. item: "#container",
  150. },
  151. //展开
  152. {
  153. type: "height",
  154. item: ".read-more-hidden",
  155. },
  156. ],
  157. },
  158. {
  159. name: "简书",
  160. url: "jianshu.com/p",
  161. handles: [
  162. //下载弹窗
  163. {
  164. type: "display",
  165. item: ".download-app-guidance",
  166. },
  167. //阅读全文
  168. {
  169. type: "display",
  170. item: ".collapse-tips",
  171. },
  172. {
  173. type: "height",
  174. item: ".collapse-free-content",
  175. },
  176. //允许滑动
  177. {
  178. type: "overflow",
  179. item: "body",
  180. },
  181. ],
  182. //删除遮挡栏
  183. fun: function () {
  184. let css = document.createElement('style');
  185. css.innerText = '.collapse-free-content::after {height: 0px !important}';
  186. document.head.appendChild(css);
  187. }
  188. },
  189. {
  190. name: "知乎",
  191. url: "www.zhihu.com/question",
  192. handles: [
  193. //PC端:显示全部(问题描述)
  194. {
  195. type: "click",
  196. item: ".QuestionRichText-more",
  197. },
  198. //允许滑动
  199. {
  200. type: "overflow",
  201. item: "body",
  202. },
  203. //PC+移动版:展开阅读全文+查看问题描述
  204. {
  205. type: "display",
  206. item: ".ContentItem-rightButton",
  207. },
  208. {
  209. type: "height",
  210. item: ".RichContent-inner",
  211. },
  212. ],
  213. //删除透明遮挡
  214. fun: function () {
  215. let items = document.querySelectorAll(".RichContent-inner");
  216. for (let item of items) {
  217. item.style.setProperty("-webkit-mask-image", "none", "important");
  218. }
  219. },
  220. },
  221. {
  222. name: "百度经验",
  223. url: "jingyan.baidu.com/article",
  224. handles: [
  225. //PC端:展开内容
  226. {
  227. type: "display",
  228. item: ".read-whole-mask",
  229. },
  230. {
  231. type: "height",
  232. item: ".exp-content-container",
  233. },
  234. //展开内容
  235. {
  236. type: "click",
  237. item: ".more-img-opt",
  238. },
  239. ],
  240. },
  241. {
  242. //https://zhidao.baidu.com/question/646382577725897205.html
  243. //https://zhidao.baidu.com/question/422818846
  244. name: "百度知道",
  245. url: "zhidao.baidu.com/question",
  246. handles: [
  247. //展开剩余
  248. {
  249. type: "display",
  250. item: ".w-detail-display-btn",
  251. },
  252. {
  253. type: "height",
  254. item: ".w-detail-container",
  255. },
  256. //PC端:展开全部(1)
  257. {
  258. type: "display",
  259. item: ".wgt-best-mask",
  260. },
  261. {
  262. type: "height",
  263. item: ".best-text",
  264. },
  265. //PC端:展开全部(2)
  266. {
  267. type: "display",
  268. item: ".wgt-answers-mask",
  269. },
  270. {
  271. type: "height",
  272. item: ".answer-text",
  273. },
  274. //PC端:更多回答1
  275. {
  276. type: "display",
  277. item: "#show-hide-container",
  278. },
  279. //PC端:更多回答2
  280. {
  281. type: "display",
  282. item: ".show-answer-dispute",
  283. },
  284. ],
  285. fun: function () {
  286. let items = document.querySelectorAll(".answer");
  287. if (items) {
  288. for (let item of items) {
  289. item.classList.remove("answer-hide");
  290. item.classList.remove("answer-dispute-hide");
  291. }
  292. }
  293. },
  294. },
  295. {
  296. name: "百度百科",
  297. url: "baike.baidu.com/item",
  298. handles: [
  299. //展开全部
  300. {
  301. type: "click",
  302. item: ".table-show-all",
  303. },
  304. ],
  305. },
  306. {
  307. name: "百度贴吧",
  308. url: "tieba.baidu.com/p",
  309. handles: [
  310. //PC端:自动展开图片
  311. {
  312. type: "display",
  313. item: ".replace_tip",
  314. },
  315. {
  316. type: "height",
  317. item: ".replace_div",
  318. },
  319. //PC端:自动展开回复
  320. {
  321. type: "click",
  322. item: ".j_lzl_m",
  323. },
  324. ],
  325. },
  326. {
  327. //https://wk.baidu.com/view/a87844da7f1922791688e862
  328. name: "百度文库手机版1",
  329. url: "wk.baidu.com/view",
  330. handles: [
  331. //自动展开
  332. {
  333. type: "height",
  334. item: ".reader-copy",
  335. },
  336. {
  337. //透明遮挡
  338. type: "display",
  339. item: ".blur-bg",
  340. },
  341. ],
  342. fun: function () {
  343. //工具相关内容下移,避免遮挡
  344. let item = document.querySelector(".fold-pager");
  345. item.style.setProperty("margin-top", "0px");
  346. },
  347. },
  348. {
  349. //https://tanbi.baidu.com/h5apptopic/browse/wkjumpdownload?fromKey=1028200x&docId=0e07a7f1ba0d4a7302763aea
  350. name: "百度文库手机版2",
  351. url: "tanbi.baidu.com/h5apptopic/browse/",
  352. handles: [
  353. {
  354. //下载app,继续阅读
  355. type: "display",
  356. item: ".continue-read-wrap",
  357. },
  358. ],
  359. fun: function () {
  360. let item = document.querySelector("#read-view");
  361. item.setAttribute("scrolling", "yes");
  362. },
  363. },
  364. {
  365. name: "百家号",
  366. url: "baijiahao.baidu.com/s",
  367. handles: [
  368. //阅读全文
  369. {
  370. type: "display",
  371. item: ".oPadding",
  372. },
  373. {
  374. type: "height",
  375. item: ".mainContent",
  376. },
  377. ],
  378. },
  379. {
  380. name: "百度app新闻",
  381. url: "mbd.baidu.com/newspage/data",
  382. handles: [
  383. //类似于百家
  384. //阅读全文
  385. {
  386. type: "display",
  387. item: ".height-fold",
  388. },
  389. {
  390. type: "height",
  391. item: ".dynamic-item",
  392. },
  393.  
  394. //类似于百度
  395. //阅读全文
  396. {
  397. type: "display",
  398. item: ".packupButton",
  399. },
  400. {
  401. type: "height",
  402. item: ".mainContent",
  403. },
  404. ],
  405. },
  406. {
  407. name: "百度资讯",
  408. url: "m.baidu.com/sf_baijiahao",
  409. handles: [
  410. //展开全文
  411. {
  412. type: "display",
  413. item: ".oPadding",
  414. },
  415. {
  416. type: "height",
  417. item: ".mainContent",
  418. },
  419. ],
  420. },
  421. {
  422. name: "百度新闻",
  423. url: "news.baidu.com/news#/detail",
  424. handles: [
  425. //阅读全文
  426. {
  427. type: "display",
  428. item: ".show-more-btn-container",
  429. },
  430. {
  431. type: "display",
  432. item: ".show-more-end",
  433. },
  434. {
  435. type: "height",
  436. item: ".detail-content-main",
  437. },
  438. ],
  439. },
  440. {
  441. name: "新浪新闻",
  442. url: "sina.cn",
  443. handles: [
  444. //展开
  445. {
  446. type: "display",
  447. item: ".look_more",
  448. },
  449. {
  450. type: "height",
  451. item: ".s_card",
  452. },
  453. ],
  454. },
  455. {
  456. name: "网易新闻",
  457. url: "3g.163.com",
  458. handles: [
  459. //展开
  460. {
  461. type: "display",
  462. item: ".show_article",
  463. },
  464. {
  465. type: "height",
  466. item: "article",
  467. },
  468. ],
  469. },
  470. {
  471. name: "搜狐新闻",
  472. url: "sohu.com/a",
  473. handles: [
  474. //展开
  475. {
  476. type: "display",
  477. item: ".lookall-box",
  478. },
  479. ],
  480. fun: function () {
  481. let item = document.querySelector(".hidden-content");
  482. //移动版
  483. item.classList.remove("hide");
  484. //pc版
  485. item.classList.remove("control-hide");
  486. },
  487. },
  488. {
  489. name: "腾讯新闻",
  490. url: "view.inews.qq.com/",
  491. handles: [
  492. //点击展开全文
  493. {
  494. type: "display",
  495. item: "[class^=show-more_outer__]",
  496. },
  497. {
  498. type: "display",
  499. item: "[class^=show-more-article_cover__]",
  500. },
  501. {
  502. type: "height",
  503. item: "[class^=show-more_height-not-full__]",
  504. },
  505. ],
  506. },
  507. {
  508. name: "凤凰新闻",
  509. url: "ifeng.com/",
  510. handles: [
  511. //点击查看完整内容(房子)
  512. {
  513. type: "display",
  514. item: ".showall",
  515. },
  516. {
  517. type: "height",
  518. item: ".article",
  519. },
  520. //点击展开全文(资讯)
  521. {
  522. type: "display",
  523. item: "[class^=tip]",
  524. },
  525. //展开全文(汽车)
  526. {
  527. type: "display",
  528. item: "[class^=more]",
  529. },
  530. {
  531. type: "height",
  532. item: "[class^=main_content]",
  533. },
  534. //展开(财经视频介绍)
  535. {
  536. type: "click",
  537. item: "[class^=videoBrefTextBtn-]",
  538. },
  539. ],
  540. },
  541. {
  542. name: "澎湃新闻",
  543. url: "m.thepaper.cn/newsDetail_forward",
  544. handles: [
  545. //展开全文
  546. {
  547. type: "display",
  548. item: "#clickForMore",
  549. },
  550. {
  551. type: "height",
  552. item: ".newsdetail_body",
  553. },
  554. ],
  555. },
  556. {
  557. name: "新京报",
  558. url: "m.bjnews.com.cn/detail/",
  559. handles: [
  560. //展开全文
  561. {
  562. type: "display",
  563. item: ".shade",
  564. },
  565. {
  566. type: "height",
  567. item: ".article",
  568. },
  569. ],
  570. },
  571. {
  572. name: "环球网1",
  573. url: "huanqiu.com/article/",
  574. handles: [
  575. //展开全文
  576. {
  577. type: "click",
  578. item: ".unfold-btn",
  579. },
  580. ],
  581. },
  582. {
  583. name: "环球网2",
  584. url: "3w.huanqiu.com/a/",
  585. handles: [
  586. //展开全文
  587. {
  588. type: "click",
  589. item: "#more",
  590. },
  591. ],
  592. },
  593. {
  594. name: "丁香园",
  595. url: "3g.dxy.cn",
  596. handles: [
  597. //显示第一条评论
  598. {
  599. type: "height",
  600. item: ".dicussion-text",
  601. },
  602. //展开阅读全文
  603. {
  604. type: "display",
  605. item: "[class^=contentWrapBottom___]",
  606. },
  607. {
  608. type: "height",
  609. item: "[class^=contentWrap___]",
  610. },
  611. ],
  612. },
  613. {
  614. //https://www.bilibili.com/read/mobile?id=18846196
  615. name: "B站专栏",
  616. url: "www.bilibili.com/read/mobile",
  617. handles: [
  618. //继续阅读全文
  619. {
  620. type: "display",
  621. item: ".read-more",
  622. },
  623. ],
  624. fun: function () {
  625. let item = document.querySelector(".read-article-box");
  626. item.classList.remove("limit");
  627. item.classList.remove("show-later");
  628. },
  629. },
  630. {
  631. //https://weibo.com/ttarticle/p/show?id=2309404770482854428687
  632. name: "微博文章PC版",
  633. url: "weibo.com/ttarticle/p/show?id=",
  634. handles: [
  635. {
  636. type: "height",
  637. item: ".WB_editor_iframe_new",
  638. },
  639. {
  640. type: "display",
  641. item: ".btn_line",
  642. },
  643. ],
  644. },
  645. {
  646. //https://card.weibo.com/article/m/show/id/2309404770482854428687
  647. name: "微博文章移动版",
  648. url: "card.weibo.com/article/m/show/id",
  649. handles: [
  650. {
  651. type: "height",
  652. item: ".f-art",
  653. },
  654. {
  655. type: "display",
  656. item: ".f-art-opt",
  657. },
  658. ],
  659. },
  660. {
  661. //https://www.oschina.net/p/xmind
  662. name: "开源中国",
  663. url: "www.oschina.net/p/",
  664. handles: [
  665. //展开阅读全文
  666. {
  667. type: "display",
  668. item: ".collapse-bar",
  669. },
  670. {
  671. type: "height",
  672. item: ".article-detail",
  673. },
  674. ],
  675. },
  676. //移动版:http://www.360doc.cn/article/60244337_924865821.html
  677. {
  678. name: "360图书馆手机版",
  679. url: "www.360doc.cn/article/",
  680. handles: [
  681. //移动版:展开剩余内容
  682. {
  683. type: "display",
  684. item: ".article_showall",
  685. },
  686. {
  687. type: "height",
  688. item: ".article",
  689. },
  690. ],
  691. },
  692. //PC版:http://www.360doc.com/content/20/0717/15/60244337_924865821.shtml
  693. {
  694. name: "360图书馆PC版",
  695. url: "www.360doc.com/content/",
  696. handles: [
  697. //展开
  698. // {
  699. // type: "display",
  700. // item: ".article_showall",
  701. // },
  702. ],
  703. fun: function () {
  704. let item = document.querySelector("body");
  705. item.classList.remove("articleMaxH");
  706. },
  707. },
  708. {
  709. //https://g.pconline.com.cn/x/1504/15043167.html
  710. name: "太平洋电脑网",
  711. url: "g.pconline.com.cn/x/",
  712. handles: [
  713. //展开全文
  714. {
  715. type: "display",
  716. item: ".show_article",
  717. },
  718. {
  719. type: "height",
  720. item: ".art-content",
  721. },
  722. ],
  723. },
  724. {
  725. //https://m.zol.com.cn/article/7934726.html
  726. name: "中关村在线",
  727. url: "m.zol.com.cn/article/",
  728. handles: [
  729. //展开全文
  730. {
  731. type: "display",
  732. item: ".unfold-article-btn",
  733. },
  734. {
  735. type: "height",
  736. item: ".article-content",
  737. },
  738. ],
  739. },
  740. {
  741. name: "汽车之家",
  742. url: "chejiahao.m.autohome.com.cn",
  743. handles: [
  744. //展开全文
  745. {
  746. type: "display",
  747. item: ".unfold_warp",
  748. },
  749. ],
  750. fun: function () {
  751. //删除class
  752. let items = document.querySelectorAll(".pgc-details .fn-hide");
  753. for (let item of items) {
  754. item.classList.remove("fn-hide");
  755. }
  756. },
  757. },
  758. {
  759. //https://m.douban.com/group/topic/197415364/
  760. name: "豆瓣文章",
  761. url: "m.douban.com/group/topic/",
  762. handles: [
  763. //点击展开全文
  764. {
  765. type: "display",
  766. item: ".oia-readall",
  767. },
  768. {
  769. type: "height",
  770. item: ".note-content",
  771. },
  772. ],
  773. },
  774. {
  775. //https://3g.ali213.net/news/html/716303.html
  776. name: "游侠网",
  777. url: "3g.ali213.net",
  778. handles: [
  779. //阅读全文
  780. {
  781. type: "display",
  782. item: ".read-all-con",
  783. },
  784. {
  785. type: "display",
  786. item: ".read-all-con2",
  787. },
  788. {
  789. type: "height",
  790. item: ".detail-content",
  791. },
  792. ],
  793. },
  794. {
  795. name: "程序猿DD",
  796. url: "blog.didispace.com",
  797. handles: [
  798. //阅读全文,人机检测
  799. {
  800. type: "display",
  801. item: "#read-more-wrap",
  802. },
  803. {
  804. type: "height",
  805. item: ".article",
  806. },
  807. ],
  808. },
  809. {
  810. name: "好网角收藏夹",
  811. url: "wang1314.com/doc",
  812. handles: [
  813. //PC端:阅读全文,人机检测
  814. {
  815. type: "display",
  816. item: "#show_content_bar",
  817. },
  818. {
  819. type: "height",
  820. item: "#art_body",
  821. },
  822. //阅读原文全部内容
  823. {
  824. type: "display",
  825. item: "#show_content_bar"
  826. },
  827. {
  828. type: "height",
  829. item: "#body_content"
  830. }
  831. ],
  832. },
  833. {
  834. name: "科中资源网",
  835. url: "k4china.com",
  836. handles: [
  837. //点击阅读全文
  838. {
  839. type: "click",
  840. item: ".readmore",
  841. },
  842. ],
  843. },
  844. {
  845. name: "tofacebook",
  846. url: "www.tofacebook.com",
  847. handles: [
  848. //阅读全部
  849. {
  850. type: "height",
  851. item: ".panel-default"
  852. },
  853. {
  854. type: "display",
  855. item: ".more-box",
  856. },
  857. ],
  858. },
  859. ];
  860. let time = 0;
  861. let interval = setInterval(() => {
  862. if (++time == 100) {
  863. clearInterval(interval);
  864. }
  865. for (let website of websites) {
  866. if (location.href.indexOf(website.url) != -1) {
  867. if (website.fun) {
  868. website.fun();
  869. }
  870. for (let handle of website.handles) {
  871. let items = document.querySelectorAll(handle.item);
  872. if (items.length != 0) {
  873. if (handle.type == "display") {
  874. //隐藏遮挡部分
  875. for (let item of items) {
  876. item.style.display = "none";
  877. }
  878. } else if (handle.type == "height") {
  879. //加长内容部分
  880. for (let item of items) {
  881. item.style.setProperty("height", "unset", "important");
  882. item.style.setProperty("max-height", "unset", "important");
  883. item.style.setProperty("max-height", "unset", "important");
  884. }
  885. } else if (handle.type == "overflow") {
  886. //防止无法滑动
  887. for (let item of items) {
  888. item.style.setProperty("overflow", "unset", "important");
  889. }
  890. } else {
  891. //模拟点击,后续可能取消
  892. for (let item of items) {
  893. if (item != null && item.getAttribute("opened") != "yes") {
  894. item.click();
  895. item.setAttribute("opened", "yes");
  896. }
  897. }
  898. }
  899. }
  900. }
  901. }
  902. }
  903. }, 100);
  904. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址