自动展开

自动展开文档 隐藏部分;长期维护、PC+手机全平台支持;全平台支持:CSDN、编程之家、简书、知乎、百家号、百度资讯、百度百科、百度经验、百度知道、百度贴吧、百度新闻、新浪新闻、腾讯新闻、搜狐新闻、网易新闻、凤凰新闻、澎湃新闻、新京报、央广网、环球网、人民日报、人民网、中华网、今日头条、东方资讯、丁香园、有来医生、健康界、36氪、果壳、虎扑、虎嗅、头条、B站专栏、B站笔记、微博文章、豆瓣文章、豆瓣小组、开源中国、阿里云开发者社区、腾讯云开发者社区、华为云开发者社区、360图书馆、太平洋电脑网、中关村在线、汽车之家、游侠网、游民星空、网易大神、360问答、天眼查、天涯社区、新浪财经、东方财富网、喜马拉雅、it1352、代码随想录、古诗文网

安装此脚本?
作者推荐脚本

您可能也喜欢骚扰拦截

安装此脚本
  1. // ==UserScript==
  2. // @name 自动展开
  3. // @version 1.3.79
  4. // @namespace https://github.com/AirBashX/AutoUnfold/
  5. // @homepageURL https://github.com/AirBashX/UserScript
  6. // @author airbash
  7. // @description 自动展开文档 隐藏部分;长期维护、PC+手机全平台支持;全平台支持:CSDN、编程之家、简书、知乎、百家号、百度资讯、百度百科、百度经验、百度知道、百度贴吧、百度新闻、新浪新闻、腾讯新闻、搜狐新闻、网易新闻、凤凰新闻、澎湃新闻、新京报、央广网、环球网、人民日报、人民网、中华网、今日头条、东方资讯、丁香园、有来医生、健康界、36氪、果壳、虎扑、虎嗅、头条、B站专栏、B站笔记、微博文章、豆瓣文章、豆瓣小组、开源中国、阿里云开发者社区、腾讯云开发者社区、华为云开发者社区、360图书馆、太平洋电脑网、中关村在线、汽车之家、游侠网、游民星空、网易大神、360问答、天眼查、天涯社区、新浪财经、东方财富网、喜马拉雅、it1352、代码随想录、古诗文网
  8. // @match *://*.blog.csdn.net/*
  9. // @match *://blog.csdn.net/*
  10. // @match *://ask.csdn.net/questions/*
  11. // @match *://download.csdn.net/download/*
  12. // @match *://wenku.csdn.net/answer/*
  13. // @match *://*.jb51.cc/*
  14. // @match *://*.jianshu.com/*
  15. // @match *://www.zhihu.com/question/*
  16. // @match *://zhuanlan.zhihu.com/p/*
  17. // @match *://jingyan.baidu.com/article*
  18. // @match *://zhidao.baidu.com/question*
  19. // @match *://baike.baidu.com/item/*
  20. // @match *://tieba.baidu.com/p*
  21. // @match *://wk.baidu.com/view/*
  22. // @match *://tanbi.baidu.com/h5apptopic/browse/*
  23. // @match *://baijiahao.baidu.com/s*
  24. // @match *://easylearn.baidu.com/edu-page/*
  25. // @match *://mbd.baidu.com/newspage/data/*
  26. // @match *://news.baidu.com/news*
  27. // @match *://m.baidu.com/sf_baijiahao/*
  28. // @match *://*.sina.cn/*
  29. // @match *://3g.163.com/*
  30. // @match *://*.sohu.com/a/*
  31. // @match *://view.inews.qq.com/*
  32. // @match *://*.ifeng.com/*
  33. // @match *://m.thepaper.cn/newsDetail_forward*
  34. // @match *://m.bjnews.com.cn/detail/*
  35. // @match *://*.huanqiu.com/article/*
  36. // @match *://3w.huanqiu.com/a/*
  37. // @match *://3g.china.com/act/*
  38. // @match *://m.toutiao.com/article/*
  39. // @match *://mini.eastday.com/*
  40. // @match *://*.dxy.cn/*
  41. // @match *://www.cn-healthcare.com/*
  42. // @match *://m.youlai.cn/*
  43. // @match *://space.bilibili.com/*/dynamic*
  44. // @match *://t.bilibili.com/*
  45. // @match *://www.bilibili.com/read/mobile*
  46. // @match *://m.bilibili.com/opus/*
  47. // @match *://weibo.com/ttarticle/p/show?id=*
  48. // @match *://card.weibo.com/article/m/show/id*
  49. // @match *://*.douban.com/*
  50. // @match *://www.oschina.net/p/*
  51. // @match *://developer.aliyun.com/article/*
  52. // @match *://cloud.tencent.com/developer/article/*
  53. // @match *://cloud.tencent.com/developer/beta/article/*
  54. // @match *://huaweicloud.csdn.net/*
  55. // @match *://www.360doc.cn/article/*
  56. // @match *://www.360doc.com/content/*
  57. // @match *://g.pconline.com.cn/x/*
  58. // @match *://m.zol.com.cn/article/*
  59. // @match *://m.autohome.com.cn/news/*
  60. // @match *://chejiahao.m.autohome.com.cn/info/*
  61. // @match *://*.cnr.cn/*
  62. // @match *://club.m.autohome.com.cn/bbs/*
  63. // @match *://3g.ali213.net/*
  64. // @match *://wap.gamersky.com/*
  65. // @match *://m.ds.163.com/*
  66. // @match *://wenda.so.com/q/*
  67. // @match *://m.wenda.so.com/q/*
  68. // @match *://n.tianyancha.com/content/*
  69. // @match *://bbs.tianya.cn/m/*
  70. // @match *://wap.eastmoney.com/a/*
  71. // @match *://mguba.eastmoney.com/*
  72. // @match *://emcreative.eastmoney.com/*
  73. // @match *://*.ximalaya.com/*
  74. // @match *://www.gushiwen.cn/*
  75. // @match *://*.it1352.com/*
  76. // @match *://www.taodudu.cc/news/*
  77. // @match *://programmercarl.com/*
  78. // @match *://blog.didispace.com/*
  79. // @match *://*.wang1314.com/doc/*
  80. // @match *://*.k4china.com/*
  81. // @match *://www.tofacebook.com/*
  82. // @run-at document-start
  83. // @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==
  84. // @grant none
  85. // @license GPL-3.0
  86. // ==/UserScript==
  87. (function () {
  88. "use strict";
  89.  
  90. /**
  91. * 网站列表
  92. * @type {name/url/操作类型}
  93. */
  94. const websites = [
  95. {
  96. name: "CSDN",
  97. url: "blog.csdn.net",
  98. handles: [
  99. //PC端:自动展开代码块
  100. {
  101. type: "click",
  102. item: ".hide-preCode-bt",
  103. },
  104. //PC端:关注博主即可阅读全文
  105. {
  106. type: "display",
  107. item: ".hide-article-box",
  108. },
  109. //阅读全文
  110. {
  111. type: "display",
  112. item: ".btn_mod",
  113. },
  114. {
  115. type: "height",
  116. item: ".article_content",
  117. },
  118. {
  119. type: "display",
  120. item: ".readall_box",
  121. },
  122. //展开评论
  123. {
  124. type: "click",
  125. item: ".btn_comment_readmore",
  126. },
  127. ],
  128. },
  129. {
  130. name: "CSDN问答",
  131. url: "ask.csdn.net/questions",
  132. handles: [
  133. //PC端:展开全部
  134. {
  135. type: "display",
  136. item: ".expandBtn",
  137. },
  138. {
  139. type: "height",
  140. item: ".normal-style",
  141. },
  142. //PC端:查看等多回答
  143. {
  144. type: "click",
  145. item: ".ic_ask_down_reeow",
  146. },
  147. ],
  148. },
  149. {
  150. name: "CSDN下载",
  151. url: "download.csdn.net/download",
  152. handles: [
  153. {
  154. type: "click",
  155. item: ".fl",
  156. },
  157. //展开全部
  158. {
  159. type: "click",
  160. item: ".unfold-font",
  161. },
  162. //查看更多
  163. {
  164. type: "click",
  165. item: ".el-button--text",
  166. },
  167. ],
  168. },
  169. {
  170. name: "CSDN文库",
  171. url: "wenku.csdn.net/answer/",
  172. handles: [
  173. //展开全部
  174. {
  175. type: "click",
  176. item: ".text-all",
  177. },
  178. ],
  179. },
  180. {
  181. name: "it1352",
  182. url: "it1352.com",
  183. handles: [
  184. //PC端:查看全文:解除公众号限制
  185. {
  186. type: "display",
  187. item: ".arc-body-main-more",
  188. },
  189. {
  190. type: "height",
  191. item: ".arc-body-main",
  192. },
  193. ],
  194. },
  195. {
  196. name: "编程之家",
  197. url: "jb51.cc",
  198. handles: [
  199. //PC端:阅读全文
  200. {
  201. type: "display",
  202. item: "#read-more-wrap",
  203. },
  204. {
  205. type: "height",
  206. item: "#container",
  207. },
  208. //展开
  209. {
  210. type: "height",
  211. item: ".read-more-hidden",
  212. },
  213. ],
  214. },
  215. {
  216. name: "简书",
  217. url: "jianshu.com/p",
  218. handles: [
  219. //阅读全文
  220. {
  221. type: "display",
  222. item: ".collapse-tips",
  223. },
  224. {
  225. type: "height",
  226. item: ".collapse-free-content",
  227. },
  228. //允许滑动
  229. {
  230. type: "overflow",
  231. item: "body",
  232. },
  233. ],
  234. //删除遮挡栏
  235. fun: function () {
  236. let css = document.createElement("style");
  237. css.innerText = ".collapse-free-content::after {height: 0px !important}";
  238. document.head.appendChild(css);
  239. },
  240. },
  241. {
  242. name: "知乎",
  243. url: "www.zhihu.com/question",
  244. handles: [
  245. {
  246. type: "display",
  247. item: ".ContentItem-rightButton",
  248. },
  249. {
  250. type: "height",
  251. item: ".RichContent-inner--collapsed",
  252. },
  253. ],
  254. fun: function () {
  255. let css = document.createElement("style");
  256. //空白遮挡
  257. css.innerText += ".RichContent--unescapable.is-collapsed .RichContent-inner {mask-image: unset !important;}";
  258. //点击按钮
  259. css.innerText += ".RichContent.is-collapsed {cursor: unset !important;}";
  260. document.head.append(css);
  261. },
  262. },
  263. {
  264. name: "百度经验",
  265. url: "jingyan.baidu.com/article",
  266. handles: [
  267. //PC端:展开内容
  268. {
  269. type: "display",
  270. item: ".read-whole-mask",
  271. },
  272. {
  273. type: "height",
  274. item: ".exp-content-container",
  275. },
  276. //展开内容
  277. {
  278. type: "click",
  279. item: ".more-img-opt",
  280. },
  281. ],
  282. },
  283. {
  284. name: "百度知道",
  285. url: "zhidao.baidu.com/question",
  286. handles: [
  287. //展开剩余
  288. {
  289. type: "display",
  290. item: ".w-detail-display-btn",
  291. },
  292. {
  293. type: "height",
  294. item: ".w-detail-container",
  295. },
  296. //PC端:展开全部(1)
  297. {
  298. type: "display",
  299. item: ".wgt-best-mask",
  300. },
  301. {
  302. type: "height",
  303. item: ".best-text",
  304. },
  305. //PC端:展开全部(2)
  306. {
  307. type: "display",
  308. item: ".wgt-answers-mask",
  309. },
  310. {
  311. type: "height",
  312. item: ".answer-text",
  313. },
  314. //PC端:更多回答1
  315. {
  316. type: "display",
  317. item: "#show-hide-container",
  318. },
  319. {
  320. type: "classList",
  321. item: ".answer",
  322. remove: "answer-hide",
  323. },
  324. //PC端:更多回答2
  325. {
  326. type: "display",
  327. item: ".show-answer-dispute",
  328. },
  329. {
  330. type: "classList",
  331. item: ".answer",
  332. remove: "answer-dispute-hide",
  333. },
  334. ],
  335. },
  336. {
  337. name: "百度百科",
  338. url: "baike.baidu.com/item",
  339. handles: [
  340. //展开全部
  341. {
  342. type: "click",
  343. item: ".layout-icons_down-arrow",
  344. },
  345. //点击加载更多
  346. {
  347. type: "display",
  348. item: "#ui_refresh_down",
  349. },
  350. ],
  351. fun: function () {
  352. //点击加载更多
  353. let button = document.querySelector(".yx-load-more-inner");
  354. button.dispatchEvent(new Event("tap"));
  355. },
  356. },
  357. {
  358. name: "百度贴吧",
  359. url: "tieba.baidu.com/p",
  360. handles: [
  361. //PC端:自动展开图片
  362. {
  363. type: "display",
  364. item: ".replace_tip",
  365. },
  366. {
  367. type: "height",
  368. item: ".replace_div",
  369. },
  370. //PC端:自动展开回复
  371. {
  372. type: "click",
  373. item: ".j_lzl_m",
  374. },
  375. ],
  376. },
  377. {
  378. name: "百度文库手机版1",
  379. url: "wk.baidu.com/view",
  380. handles: [
  381. //自动展开
  382. {
  383. type: "height",
  384. item: ".reader-copy",
  385. },
  386. {
  387. //透明遮挡
  388. type: "display",
  389. item: ".blur-bg",
  390. },
  391. ],
  392. fun: function () {
  393. //工具相关内容下移,避免遮挡
  394. let item = document.querySelector(".fold-pager");
  395. if (item) {
  396. item.style.setProperty("margin-top", "0px");
  397. }
  398. },
  399. },
  400. {
  401. name: "百度文库手机版2",
  402. url: "tanbi.baidu.com/h5apptopic/browse/",
  403. handles: [
  404. {
  405. //下载app,继续阅读
  406. type: "display",
  407. item: ".continue-read-wrap",
  408. },
  409. ],
  410. fun: function () {
  411. let item = document.querySelector("#read-view");
  412. item.setAttribute("scrolling", "yes");
  413. },
  414. },
  415. {
  416. name: "百家题库",
  417. url: "easylearn.baidu.com/edu-page/",
  418. handles: [
  419. //阅读全文
  420. {
  421. type: "display",
  422. item: ".shiti-answer .mask",
  423. },
  424. {
  425. type: "height",
  426. item: ".shiti-answer .analysis-text",
  427. },
  428. // 显示完整题目
  429. {
  430. type: "height",
  431. item: ".question-cont .tigan",
  432. },
  433. // 移除遮罩
  434. {
  435. type: "height",
  436. item: ".question-cont .tigan .mask",
  437. },
  438. ],
  439. },
  440. {
  441. name: "百家号",
  442. url: "baijiahao.baidu.com/s",
  443. handles: [
  444. //阅读全文
  445. {
  446. type: "display",
  447. item: ".oPadding",
  448. },
  449. {
  450. type: "height",
  451. item: ".mainContent",
  452. },
  453. //点击展开全文:狐猴浏览器特有bug
  454. {
  455. type: "height",
  456. item: "#mainContentContainer",
  457. },
  458. {
  459. type: "display",
  460. item: ".foldMaskWrapper",
  461. },
  462. ],
  463. },
  464. {
  465. name: "百度新闻",
  466. url: "mbd.baidu.com/newspage/data",
  467. handles: [
  468. //打开百度app:普通新闻
  469. {
  470. type: "display",
  471. item: "[class^=foldMaskWrapper-]",
  472. },
  473. {
  474. type: "height",
  475. item: "#dynamicItem",
  476. },
  477. //打开百度app:百度首页
  478. {
  479. type: "display",
  480. item: ".foldMaskWrapper",
  481. },
  482. {
  483. type: "height",
  484. item: "#mainContentContainer",
  485. },
  486. ],
  487. },
  488. {
  489. name: "新浪新闻",
  490. url: "sina.cn",
  491. handles: [
  492. //展开
  493. {
  494. type: "display",
  495. item: ".look_more",
  496. },
  497. {
  498. type: "height",
  499. item: ".s_card",
  500. },
  501. ],
  502. },
  503. {
  504. name: "网易新闻",
  505. url: "3g.163.com",
  506. handles: [
  507. //展开
  508. {
  509. type: "display",
  510. item: ".show_article",
  511. },
  512. {
  513. type: "height",
  514. item: "article",
  515. },
  516. ],
  517. },
  518. {
  519. name: "搜狐新闻",
  520. url: "sohu.com/a",
  521. handles: [],
  522. fun: function () {
  523. onload = function () {
  524. let item = document.querySelector("#artLookAll");
  525. item.click();
  526. clearInterval(interval);
  527. };
  528. },
  529. },
  530. {
  531. name: "腾讯新闻",
  532. url: "view.inews.qq.com/",
  533. handles: [
  534. //点击展开全文
  535. {
  536. type: "display",
  537. item: "[class^=show-more_outer__]",
  538. },
  539. {
  540. type: "display",
  541. item: "[class^=show-more-article_cover__]",
  542. },
  543. {
  544. type: "height",
  545. item: "[class^=show-more_height-not-full__]",
  546. },
  547. ],
  548. },
  549. {
  550. name: "凤凰新闻",
  551. url: "ifeng.com/",
  552. handles: [
  553. //点击展开全文(新闻)
  554. {
  555. type: "display",
  556. item: "[class^=index_more_]",
  557. },
  558. {
  559. type: "display",
  560. item: "[class^=index_tip_",
  561. },
  562. {
  563. type: "height",
  564. item: "[class^=index_main_content_]",
  565. },
  566.  
  567. //点击查看完整内容(房产)
  568. {
  569. type: "display",
  570. item: ".showall",
  571. },
  572. {
  573. type: "height",
  574. item: ".article",
  575. },
  576. //展开全文(汽车)
  577. {
  578. type: "display",
  579. item: "[class^=more]",
  580. },
  581. {
  582. type: "height",
  583. item: "[class^=main_content]",
  584. },
  585. //展开(视频简介)
  586. {
  587. type: "click",
  588. item: "[class^=index_videoBrefTextBtn_]",
  589. },
  590. ],
  591. },
  592. {
  593. name: "澎湃新闻",
  594. url: "m.thepaper.cn/newsDetail_forward",
  595. handles: [
  596. //展开全文
  597. {
  598. type: "display",
  599. item: "#clickForMore",
  600. },
  601. {
  602. type: "height",
  603. item: ".newsdetail_body",
  604. },
  605. ],
  606. },
  607. {
  608. name: "新京报",
  609. url: "m.bjnews.com.cn/detail/",
  610. handles: [
  611. //展开全文
  612. {
  613. type: "display",
  614. item: ".shade",
  615. },
  616. {
  617. type: "height",
  618. item: ".article",
  619. },
  620. ],
  621. },
  622. {
  623. name: "央广网",
  624. url: "cnr.cn",
  625. handles: [
  626. //展开全文
  627. {
  628. type: "display",
  629. item: "#readmore",
  630. },
  631. {
  632. type: "height",
  633. item: "#perny-main",
  634. },
  635. ],
  636. },
  637. {
  638. name: "环球网1",
  639. url: "huanqiu.com/article/",
  640. handles: [
  641. //展开全文
  642. {
  643. type: "click",
  644. item: ".unfold-btn",
  645. },
  646. ],
  647. },
  648. {
  649. name: "环球网2",
  650. url: "3w.huanqiu.com/a/",
  651. handles: [
  652. //展开全文
  653. {
  654. type: "click",
  655. item: "#more",
  656. },
  657. ],
  658. },
  659. {
  660. name: "中华网",
  661. url: "3g.china.com/act/",
  662. handles: [
  663. //点击查看全文(剩余n%)
  664. {
  665. type: "display",
  666. item: "#js-continue-reading",
  667. },
  668. {
  669. type: "height",
  670. item: "#artiCon",
  671. },
  672. ],
  673. },
  674. {
  675. name: "今日头条:移动版",
  676. url: "m.toutiao.com/article/",
  677. handles: [
  678. //点击查看完整内容
  679. {
  680. type: "display",
  681. item: ".toggle-button-container",
  682. },
  683. {
  684. type: "display",
  685. item: ".content-shadow",
  686. },
  687. {
  688. type: "height",
  689. item: ".content",
  690. },
  691. ],
  692. },
  693. {
  694. name: "东方资讯",
  695. url: "mini.eastday.com/",
  696. handles: [
  697. //查看全文
  698. {
  699. type: "display",
  700. item: ".Unfolded-btn",
  701. },
  702. {
  703. type: "height",
  704. item: ".article-content",
  705. },
  706. ],
  707. },
  708. {
  709. name: "丁香园",
  710. url: "dxy.cn",
  711. handles: [
  712. //显示第一条评论
  713. {
  714. type: "height",
  715. item: ".dicussion-text",
  716. },
  717. //展开阅读全文
  718. {
  719. type: "display",
  720. item: "[class^=contentWrapBottom___]",
  721. },
  722. {
  723. type: "height",
  724. item: "[class^=contentWrap___]",
  725. },
  726. //机构号:展开阅读全文
  727. {
  728. type: "display",
  729. item: ".show-all",
  730. },
  731. {
  732. type: "height",
  733. item: ".article__content",
  734. },
  735. ],
  736. },
  737. {
  738. name: "健康界",
  739. url: "www.cn-healthcare.com/",
  740. handles: [
  741. //阅读全文
  742. {
  743. type: "display",
  744. item: ".mask",
  745. },
  746. {
  747. type: "height",
  748. item: "#artbody",
  749. },
  750. ],
  751. },
  752. {
  753. name: "有来医生",
  754. url: "m.youlai.cn/",
  755. handles: [
  756. //阅读全文
  757. {
  758. type: "display",
  759. item: ".showBtn--nqouA",
  760. },
  761. {
  762. type: "height",
  763. item: ".show-more",
  764. },
  765. ],
  766. },
  767. {
  768. name: "B站动态",
  769. url: "space.bilibili.com/",
  770. handles: [],
  771. fun: function () {
  772. //PC端展开简介
  773. let item1s = document.querySelectorAll(".folded");
  774. for (let item of item1s) {
  775. item.className = "bili-rich-text__content";
  776. }
  777. let item2s = document.querySelectorAll(".bili-rich-text__action");
  778. for (let item2 of item2s) {
  779. item2.innerText = "收起";
  780. }
  781. },
  782. },
  783. {
  784. name: "B站专栏",
  785. url: "m.bilibili.com/opus/",
  786. handles: [
  787. //展开阅读全文
  788. {
  789. type: "display",
  790. item: ".opus-read-more",
  791. },
  792. {
  793. type: "classList",
  794. item: ".opus-module-content",
  795. remove: "limit",
  796. },
  797. {
  798. type: "classList",
  799. item: ".opus-module-content",
  800. remove: "show-read-text",
  801. },
  802. ],
  803. },
  804. {
  805. name: "微博文章PC版",
  806. url: "weibo.com/ttarticle/p/show?id=",
  807. handles: [
  808. {
  809. type: "height",
  810. item: ".WB_editor_iframe_new",
  811. },
  812. {
  813. type: "display",
  814. item: ".btn_line",
  815. },
  816. ],
  817. },
  818. {
  819. name: "豆瓣",
  820. url: "douban.com",
  821. handles: [
  822. //点击展开全文
  823. {
  824. type: "display",
  825. item: ".oia-readall",
  826. },
  827. {
  828. type: "height",
  829. item: ".note-content",
  830. },
  831. ],
  832. fun: function () {
  833. //展开(简介)
  834. let item1 = document.querySelector(".subject-intro p");
  835. try {
  836. let str = item1.getAttribute("data-content");
  837. if (str) {
  838. item1.innerText = str;
  839. }
  840. } catch (error) {
  841. /* empty */
  842. }
  843. onload = function () {
  844. //展开(评论)
  845. let items2 = document.querySelectorAll(".LinesEllipsis-readmore");
  846. for (let item of items2) {
  847. item.click();
  848. }
  849.  
  850. //展开(PC端:评论;简介;人物简介)
  851. let items3 = document.querySelectorAll(".expand,.a_show_full,.fold-switch");
  852. for (let item of items3) {
  853. item.click();
  854. }
  855. };
  856. },
  857. },
  858. {
  859. name: "开源中国",
  860. url: "www.oschina.net/p/",
  861. handles: [
  862. //展开阅读全文
  863. {
  864. type: "display",
  865. item: ".collapse-bar",
  866. },
  867. {
  868. type: "height",
  869. item: ".article-detail",
  870. },
  871. ],
  872. },
  873. {
  874. name: "阿里云开发者社区",
  875. url: "developer.aliyun.com/article",
  876. handles: [
  877. //关注
  878. {
  879. type: "height",
  880. item: ".article-hide-content",
  881. },
  882. {
  883. type: "display",
  884. item: ".article-hide-box",
  885. },
  886. ],
  887. },
  888. {
  889. name: "腾讯云开发者社区",
  890. url: "cloud.tencent.com/developer/article/",
  891. handles: [
  892. //旧版:展开阅读全文
  893. {
  894. type: "height",
  895. item: ".com-markdown-collpase-main",
  896. },
  897. {
  898. type: "display",
  899. item: ".com-markdown-collpase-toggle",
  900. },
  901. //新版:展开阅读全文
  902. {
  903. type: "height",
  904. item: ".cdc-expand-area__main",
  905. },
  906. {
  907. type: "display",
  908. item: ".cdc-expand-area__toggle",
  909. },
  910. ],
  911. },
  912. {
  913. name: "华为云开发者社区",
  914. url: "huaweicloud.csdn.net/",
  915. handles: [
  916. //展开阅读全文
  917. {
  918. type: "height",
  919. item: ".user-article",
  920. },
  921. {
  922. type: "display",
  923. item: ".article-show-more",
  924. },
  925. ],
  926. },
  927. {
  928. name: "360图书馆手机版",
  929. url: "www.360doc.cn/article/",
  930. handles: [
  931. //移动版:展开剩余内容
  932. {
  933. type: "display",
  934. item: ".article_showall",
  935. },
  936. {
  937. type: "height",
  938. item: ".article",
  939. },
  940. ],
  941. },
  942. {
  943. name: "360图书馆PC版",
  944. url: "www.360doc.com/content/",
  945. handles: [
  946. {
  947. type: "classList",
  948. item: "body",
  949. remove: "articleMaxH",
  950. },
  951. ],
  952. },
  953. {
  954. name: "太平洋电脑网",
  955. url: "g.pconline.com.cn/x/",
  956. handles: [
  957. //展开全文
  958. {
  959. type: "display",
  960. item: ".show_article",
  961. },
  962. {
  963. type: "height",
  964. item: ".art-content",
  965. },
  966. ],
  967. },
  968. {
  969. name: "中关村在线",
  970. url: "m.zol.com.cn/article/",
  971. handles: [
  972. //展开全文
  973. {
  974. type: "display",
  975. item: ".unfold-article-btn",
  976. },
  977. {
  978. type: "height",
  979. item: ".article-content",
  980. },
  981. ],
  982. },
  983. {
  984. name: "汽车之家:新闻",
  985. url: "m.autohome.com.cn/news/",
  986. handles: [
  987. //点击展开剩余部分
  988. {
  989. type: "display",
  990. item: "#continue_reading",
  991. },
  992. {
  993. type: "classList",
  994. item: "#content .fn-hide",
  995. remove: "fn-hide",
  996. },
  997. ],
  998. },
  999. {
  1000. name: "汽车之家:车家号",
  1001. url: "chejiahao.m.autohome.com.cn/info/",
  1002. handles: [
  1003. //点击展开剩余部分
  1004. {
  1005. type: "display",
  1006. item: "#continue_reading_new",
  1007. },
  1008. {
  1009. type: "classList",
  1010. item: ".pgc-details .fn-hide",
  1011. remove: "fn-hide",
  1012. },
  1013. ],
  1014. },
  1015. {
  1016. name: "汽车之家:论坛",
  1017. url: "club.m.autohome.com.cn/bbs/",
  1018. handles: [
  1019. //点击展开剩余部分
  1020. {
  1021. type: "display",
  1022. item: "#continue_reading",
  1023. },
  1024. {
  1025. type: "height",
  1026. item: "#topicContentSection",
  1027. },
  1028. {
  1029. type: "classList",
  1030. item: "#topicContentSection .fn-hide",
  1031. remove: "fn-hide",
  1032. },
  1033. ],
  1034. },
  1035. {
  1036. name: "游侠网",
  1037. url: "3g.ali213.net",
  1038. handles: [
  1039. //阅读全文
  1040. {
  1041. type: "display",
  1042. item: ".read-all-con",
  1043. },
  1044. {
  1045. type: "display",
  1046. item: ".read-all-con2",
  1047. },
  1048. {
  1049. type: "height",
  1050. item: ".detail-content",
  1051. },
  1052. ],
  1053. },
  1054. {
  1055. name: "游民星空",
  1056. url: "wap.gamersky.com/",
  1057. handles: [
  1058. //展开全文
  1059. {
  1060. type: "display",
  1061. item: ".gsAreaContextOpen",
  1062. },
  1063. {
  1064. type: "height",
  1065. item: "#gsAreaContext",
  1066. },
  1067. ],
  1068. },
  1069. {
  1070. name: "网易大神",
  1071. url: "m.ds.163.com/",
  1072. handles: [
  1073. //展开全文
  1074. {
  1075. type: "display",
  1076. item: ".feed-page-main-controller",
  1077. },
  1078. {
  1079. type: "height",
  1080. item: ".feed-page__main-content",
  1081. },
  1082. ],
  1083. },
  1084. {
  1085. name: "360文档",
  1086. url: "wenda.so.com/q/",
  1087. handles: [
  1088. //PC端:展开问答
  1089. {
  1090. type: "display",
  1091. item: ".answer-part__has-folder__btn",
  1092. },
  1093. {
  1094. type: "height",
  1095. item: ".answer-part__has-folder",
  1096. },
  1097. //PC端:更多回答
  1098. {
  1099. type: "display",
  1100. item: ".js-unfold-page",
  1101. },
  1102. {
  1103. type: "classList",
  1104. item: ".hide.js-unfold-answer.answer-fold-box",
  1105. remove: "hide",
  1106. },
  1107. //展开完整答案
  1108. {
  1109. type: "display",
  1110. item: ".overflow-cover",
  1111. },
  1112. {
  1113. type: "height",
  1114. item: ".max-height",
  1115. },
  1116. //更多回答
  1117. {
  1118. type: "display",
  1119. item: ".js-rest-icon",
  1120. },
  1121. {
  1122. type: "classList",
  1123. item: ".ans-box.hide",
  1124. remove: "hide",
  1125. },
  1126. ],
  1127. },
  1128. {
  1129. name: "天眼查",
  1130. url: "n.tianyancha.com/content",
  1131. handles: [
  1132. //展开剩余内容
  1133. {
  1134. type: "display",
  1135. item: "[class^=index_other-content-more__]",
  1136. },
  1137. {
  1138. type: "height",
  1139. item: "[class^=index_other-content-container__]",
  1140. },
  1141. ],
  1142. },
  1143. {
  1144. name: "天涯社区",
  1145. url: "bbs.tianya.cn/m/",
  1146. handles: [
  1147. //点击展开完整贴文
  1148. {
  1149. type: "display",
  1150. item: ".openFullPost",
  1151. },
  1152. {
  1153. type: "height",
  1154. item: ".onhide",
  1155. },
  1156. ],
  1157. //删除透明遮挡
  1158. fun: function () {
  1159. let css = document.createElement("style");
  1160. css.innerHTML = ".item-lz .bd.onhide:before{content:none}";
  1161. document.head.append(css);
  1162. },
  1163. },
  1164. {
  1165. name: "新浪财经",
  1166. url: "cj.sina.cn/article/",
  1167. handles: [
  1168. //打开app阅读全文
  1169. {
  1170. type: "display",
  1171. item: ".unfold-box",
  1172. },
  1173. {
  1174. type: "height",
  1175. item: ".main-body",
  1176. },
  1177. ],
  1178. },
  1179. {
  1180. name: "东方财富网",
  1181. url: "wap.eastmoney.com/a/",
  1182. handles: [
  1183. //点击展开完整贴文
  1184. {
  1185. type: "display",
  1186. item: ".fold-btn",
  1187. },
  1188. {
  1189. type: "display",
  1190. item: ".fold-arrow",
  1191. },
  1192. {
  1193. type: "height",
  1194. item: "#articleContent",
  1195. },
  1196. //删除透明遮挡
  1197. {
  1198. type: "display",
  1199. item: ".fold-mask",
  1200. },
  1201. ],
  1202. },
  1203. {
  1204. name: "东方财富网:社区",
  1205. url: "emcreative.eastmoney.com/",
  1206. handles: [
  1207. //点击阅读全文
  1208. {
  1209. type: "display",
  1210. item: ".my_ad_wrap",
  1211. },
  1212. {
  1213. type: "height",
  1214. item: "#text-content",
  1215. },
  1216. ],
  1217. },
  1218. {
  1219. name: "东方财富网:股吧",
  1220. url: "mguba.eastmoney.com/",
  1221. handles: [
  1222. //点击阅读全文
  1223. {
  1224. type: "display",
  1225. item: "#foldup_box",
  1226. },
  1227. {
  1228. type: "height",
  1229. item: "#content",
  1230. },
  1231. ],
  1232. },
  1233. {
  1234. name: "喜马拉雅",
  1235. url: "www.ximalaya.com/",
  1236. handles: [
  1237. //简介
  1238. {
  1239. type: "display",
  1240. item: ".more-intro-wrapper",
  1241. },
  1242. {
  1243. type: "height",
  1244. item: ".layout-main div>article",
  1245. },
  1246. ],
  1247. },
  1248. {
  1249. name: "喜马拉雅",
  1250. url: "m.ximalaya.com/",
  1251. handles: [
  1252. //简介+评论
  1253. {
  1254. type: "height",
  1255. item: ".stretch-box",
  1256. },
  1257. ],
  1258. fun: function () {
  1259. onload = function () {
  1260. let item1 = document.querySelector(".stretch-more");
  1261. let item2 = item1.parentElement;
  1262. item2.remove();
  1263. };
  1264. },
  1265. },
  1266. {
  1267. name: "古诗文网",
  1268. url: "www.gushiwen.cn/",
  1269. handles: [],
  1270. fun: function () {
  1271. let item1s = document.evaluate("//a[contains(text(), '阅读全文')]", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
  1272. for (let i = 0; i < item1s.snapshotLength; i++) {
  1273. item1s.snapshotItem(i).click();
  1274. }
  1275. clearInterval(interval);
  1276. },
  1277. },
  1278. {
  1279. name: "淘嘟嘟",
  1280. url: "www.taodudu.cc/news/",
  1281. handles: [
  1282. //阅读全文,人机检测
  1283. {
  1284. type: "display",
  1285. item: "#vip",
  1286. },
  1287. {
  1288. type: "height",
  1289. item: "#article_content",
  1290. },
  1291. ],
  1292. },
  1293. {
  1294. name: "代码随想录",
  1295. url: "programmercarl.com/",
  1296. handles: [
  1297. //阅读全文
  1298. {
  1299. type: "display",
  1300. item: "#read-more-wrap",
  1301. },
  1302. {
  1303. type: "height",
  1304. item: "#container",
  1305. },
  1306. ],
  1307. },
  1308. {
  1309. name: "程序猿DD",
  1310. url: "blog.didispace.com",
  1311. handles: [
  1312. //阅读全文,人机检测
  1313. {
  1314. type: "display",
  1315. item: "#read-more-wrap",
  1316. },
  1317. {
  1318. type: "height",
  1319. item: ".article",
  1320. },
  1321. ],
  1322. },
  1323. {
  1324. name: "好网角收藏夹",
  1325. url: "wang1314.com/doc",
  1326. handles: [
  1327. //PC端:阅读全文,人机检测
  1328. {
  1329. type: "display",
  1330. item: "#show_content_bar",
  1331. },
  1332. {
  1333. type: "height",
  1334. item: "#art_body",
  1335. },
  1336. //阅读原文全部内容
  1337. {
  1338. type: "display",
  1339. item: "#show_content_bar",
  1340. },
  1341. {
  1342. type: "height",
  1343. item: "#body_content",
  1344. },
  1345. ],
  1346. },
  1347. {
  1348. name: "科中资源网",
  1349. url: "k4china.com",
  1350. handles: [
  1351. //点击阅读全文
  1352. {
  1353. type: "click",
  1354. item: ".readmore",
  1355. },
  1356. ],
  1357. },
  1358. {
  1359. name: "tofacebook",
  1360. url: "www.tofacebook.com",
  1361. handles: [
  1362. //阅读全部
  1363. {
  1364. type: "height",
  1365. item: ".panel-default",
  1366. },
  1367. {
  1368. type: "display",
  1369. item: ".more-box",
  1370. },
  1371. ],
  1372. },
  1373. ];
  1374. let time = 0;
  1375. let interval = setInterval(() => {
  1376. if (++time == 100) {
  1377. clearInterval(interval);
  1378. }
  1379. for (let website of websites) {
  1380. if (location.href.indexOf(website.url) != -1) {
  1381. if (website.fun) {
  1382. website.fun();
  1383. }
  1384. for (let handle of website.handles) {
  1385. let items = document.querySelectorAll(handle.item);
  1386. if (items.length != 0) {
  1387. if (handle.type == "display") {
  1388. //隐藏遮挡部分
  1389. for (let item of items) {
  1390. item.style.display = "none";
  1391. }
  1392. } else if (handle.type == "height") {
  1393. //加长内容部分
  1394. for (let item of items) {
  1395. item.style.setProperty("height", "unset", "important");
  1396. item.style.setProperty("min-height", "unset", "important");
  1397. item.style.setProperty("max-height", "unset", "important");
  1398. }
  1399. } else if (handle.type == "overflow") {
  1400. //防止无法滑动
  1401. for (let item of items) {
  1402. item.style.setProperty("overflow", "unset", "important");
  1403. }
  1404. } else if (handle.type == "classList") {
  1405. //删除className
  1406. for (let item of items) {
  1407. item.classList.remove(handle.remove);
  1408. }
  1409. } else if (handle.type == "click") {
  1410. //模拟一次点击
  1411. for (let item of items) {
  1412. if (item != null && item.getAttribute("opened") != "yes") {
  1413. item.click();
  1414. item.setAttribute("opened", "yes");
  1415. }
  1416. }
  1417. } else {
  1418. //模拟多次点击
  1419. for (let item of items) {
  1420. if (item) {
  1421. item.click();
  1422. }
  1423. }
  1424. }
  1425. }
  1426. }
  1427. }
  1428. }
  1429. }, 100);
  1430. })();

QingJ © 2025

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