自动展开

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

目前为 2023-11-16 提交的版本。查看 最新版本

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

QingJ © 2025

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