自动展开

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

目前为 2023-03-09 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name 自动展开
  3. // @version 1.3.38
  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图书馆、太平洋电脑网、中关村在线、汽车之家、游侠网、360问答、天眼查、天涯社区、东方财富网
  8. // @match *://*.blog.csdn.net/*
  9. // @match *://blog.csdn.net/*
  10. // @match *://ask.csdn.net/questions/*
  11. // @match *://*.it1352.com/*
  12. // @match *://*.jb51.cc/*
  13. // @match *://*.jianshu.com/*
  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.cn-healthcare.com/*
  36. // @match *://www.bilibili.com/read/mobile*
  37. // @match *://weibo.com/ttarticle/p/show?id=*
  38. // @match *://m.douban.com/book/review/*
  39. // @match *://m.douban.com/group/topic/*
  40. // @match *://www.oschina.net/p/*
  41. // @match *://developer.aliyun.com/article/*
  42. // @match *://cloud.tencent.com/developer/article/*
  43. // @match *://www.360doc.cn/article/*
  44. // @match *://www.360doc.com/content/*
  45. // @match *://g.pconline.com.cn/x/*
  46. // @match *://m.zol.com.cn/article/*
  47. // @match *://m.autohome.com.cn/news/*
  48. // @match *://chejiahao.m.autohome.com.cn/info/*
  49. // @match *://club.m.autohome.com.cn/bbs/*
  50. // @match *://3g.ali213.net/*
  51. // @match *://wenda.so.com/q/*
  52. // @match *://m.wenda.so.com/q/*
  53. // @match *://n.tianyancha.com/content/*
  54. // @match *://bbs.tianya.cn/m/*
  55. // @match *://wap.eastmoney.com/a/*
  56. // @match *://mguba.eastmoney.com/*
  57. // @match *://emcreative.eastmoney.com/*
  58. // @match *://blog.didispace.com/*
  59. // @match *://*.wang1314.com/doc/*
  60. // @match *://*.k4china.com/*
  61. // @match *://www.tofacebook.com/*
  62. // @run-at document-body
  63. // @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==
  64. // @grant none
  65. // @license GPL-3.0
  66. // ==/UserScript==
  67. (function () {
  68. "use strict";
  69.  
  70. /**
  71. * 网站列表
  72. * @type {name/url/操作类型}
  73. */
  74. const websites = [
  75. {
  76. name: "CSDN",
  77. url: "blog.csdn.net",
  78. handles: [
  79. //PC端:自动展开代码块
  80. {
  81. type: "click",
  82. item: ".hide-preCode-bt",
  83. },
  84. //PC端:关注博主即可阅读全文
  85. {
  86. type: "display",
  87. item: ".hide-article-box",
  88. },
  89. //下载弹窗
  90. {
  91. type: "display",
  92. item: ".weixin-shadowbox",
  93. },
  94. //阅读全文
  95. {
  96. type: "display",
  97. item: ".btn_mod",
  98. },
  99. {
  100. type: "height",
  101. item: ".article_content",
  102. },
  103. {
  104. type: "display",
  105. item: ".readall_box",
  106. },
  107. //展开评论
  108. {
  109. type: "click",
  110. item: ".btn_comment_readmore",
  111. },
  112. ],
  113. },
  114. {
  115. name: "CSDN问答",
  116. url: "ask.csdn.net/questions",
  117. handles: [
  118. //PC端:展开全部
  119. {
  120. type: "display",
  121. item: ".expandBtn",
  122. },
  123. {
  124. type: "height",
  125. item: ".normal-style",
  126. },
  127. //PC端:查看等多回答
  128. {
  129. type: "click",
  130. item: ".ic_ask_down_reeow",
  131. },
  132. ],
  133. },
  134. {
  135. name: "it1352",
  136. url: "it1352.com",
  137. handles: [
  138. //PC端:查看全文:解除公众号限制
  139. {
  140. type: "display",
  141. item: ".arc-body-main-more",
  142. },
  143. {
  144. type: "height",
  145. item: ".arc-body-main",
  146. },
  147. ],
  148. },
  149. {
  150. name: "编程之家",
  151. url: "jb51.cc",
  152. handles: [
  153. //PC端:阅读全文
  154. {
  155. type: "display",
  156. item: "#read-more-wrap",
  157. },
  158. {
  159. type: "height",
  160. item: "#container",
  161. },
  162. //展开
  163. {
  164. type: "height",
  165. item: ".read-more-hidden",
  166. },
  167. ],
  168. },
  169. {
  170. name: "简书",
  171. url: "jianshu.com/p",
  172. handles: [
  173. //下载弹窗
  174. {
  175. type: "display",
  176. item: ".download-app-guidance",
  177. },
  178. //阅读全文
  179. {
  180. type: "display",
  181. item: ".collapse-tips",
  182. },
  183. {
  184. type: "height",
  185. item: ".collapse-free-content",
  186. },
  187. //允许滑动
  188. {
  189. type: "overflow",
  190. item: "body",
  191. },
  192. ],
  193. //删除遮挡栏
  194. fun: function () {
  195. let css = document.createElement("style");
  196. css.innerText = ".collapse-free-content::after {height: 0px !important}";
  197. document.head.appendChild(css);
  198. },
  199. },
  200. {
  201. name: "知乎",
  202. url: "www.zhihu.com/question",
  203. handles: [
  204. //PC端:显示全部(问题描述)
  205. {
  206. type: "click",
  207. item: ".QuestionRichText-more",
  208. },
  209. //允许滑动
  210. {
  211. type: "overflow",
  212. item: "body",
  213. },
  214. //PC+移动版:展开阅读全文+查看问题描述
  215. {
  216. type: "display",
  217. item: ".ContentItem-rightButton",
  218. },
  219. {
  220. type: "height",
  221. item: ".RichContent-inner",
  222. },
  223. ],
  224. //删除透明遮挡
  225. fun: function () {
  226. let items = document.querySelectorAll(".RichContent-inner");
  227. for (let item of items) {
  228. item.style.setProperty("-webkit-mask-image", "none", "important");
  229. }
  230. },
  231. },
  232. {
  233. name: "百度经验",
  234. url: "jingyan.baidu.com/article",
  235. handles: [
  236. //PC端:展开内容
  237. {
  238. type: "display",
  239. item: ".read-whole-mask",
  240. },
  241. {
  242. type: "height",
  243. item: ".exp-content-container",
  244. },
  245. //展开内容
  246. {
  247. type: "click",
  248. item: ".more-img-opt",
  249. },
  250. ],
  251. },
  252. {
  253. //https://zhidao.baidu.com/question/646382577725897205.html
  254. //https://zhidao.baidu.com/question/422818846
  255. name: "百度知道",
  256. url: "zhidao.baidu.com/question",
  257. handles: [
  258. //展开剩余
  259. {
  260. type: "display",
  261. item: ".w-detail-display-btn",
  262. },
  263. {
  264. type: "height",
  265. item: ".w-detail-container",
  266. },
  267. //PC端:展开全部(1)
  268. {
  269. type: "display",
  270. item: ".wgt-best-mask",
  271. },
  272. {
  273. type: "height",
  274. item: ".best-text",
  275. },
  276. //PC端:展开全部(2)
  277. {
  278. type: "display",
  279. item: ".wgt-answers-mask",
  280. },
  281. {
  282. type: "height",
  283. item: ".answer-text",
  284. },
  285. //PC端:更多回答1
  286. {
  287. type: "display",
  288. item: "#show-hide-container",
  289. },
  290. //PC端:更多回答2
  291. {
  292. type: "display",
  293. item: ".show-answer-dispute",
  294. },
  295. ],
  296. fun: function () {
  297. let items = document.querySelectorAll(".answer");
  298. if (items) {
  299. for (let item of items) {
  300. item.classList.remove("answer-hide");
  301. item.classList.remove("answer-dispute-hide");
  302. }
  303. }
  304. },
  305. },
  306. {
  307. name: "百度百科",
  308. url: "baike.baidu.com/item",
  309. handles: [
  310. //展开全部
  311. {
  312. type: "click",
  313. item: ".table-show-all",
  314. },
  315. ],
  316. },
  317. {
  318. name: "百度贴吧",
  319. url: "tieba.baidu.com/p",
  320. handles: [
  321. //PC端:自动展开图片
  322. {
  323. type: "display",
  324. item: ".replace_tip",
  325. },
  326. {
  327. type: "height",
  328. item: ".replace_div",
  329. },
  330. //PC端:自动展开回复
  331. {
  332. type: "click",
  333. item: ".j_lzl_m",
  334. },
  335. ],
  336. },
  337. {
  338. //https://wk.baidu.com/view/a87844da7f1922791688e862
  339. name: "百度文库手机版1",
  340. url: "wk.baidu.com/view",
  341. handles: [
  342. //自动展开
  343. {
  344. type: "height",
  345. item: ".reader-copy",
  346. },
  347. {
  348. //透明遮挡
  349. type: "display",
  350. item: ".blur-bg",
  351. },
  352. ],
  353. fun: function () {
  354. //工具相关内容下移,避免遮挡
  355. let item = document.querySelector(".fold-pager");
  356. item.style.setProperty("margin-top", "0px");
  357. },
  358. },
  359. {
  360. //https://tanbi.baidu.com/h5apptopic/browse/wkjumpdownload?fromKey=1028200x&docId=0e07a7f1ba0d4a7302763aea
  361. name: "百度文库手机版2",
  362. url: "tanbi.baidu.com/h5apptopic/browse/",
  363. handles: [
  364. {
  365. //下载app,继续阅读
  366. type: "display",
  367. item: ".continue-read-wrap",
  368. },
  369. ],
  370. fun: function () {
  371. let item = document.querySelector("#read-view");
  372. item.setAttribute("scrolling", "yes");
  373. },
  374. },
  375. {
  376. name: "百家号",
  377. url: "baijiahao.baidu.com/s",
  378. handles: [
  379. //阅读全文
  380. {
  381. type: "display",
  382. item: ".oPadding",
  383. },
  384. {
  385. type: "height",
  386. item: ".mainContent",
  387. },
  388. ],
  389. },
  390. {
  391. name: "百度app新闻",
  392. url: "mbd.baidu.com/newspage/data",
  393. handles: [
  394. //类似于百家
  395. //阅读全文
  396. {
  397. type: "display",
  398. item: ".height-fold",
  399. },
  400. {
  401. type: "height",
  402. item: ".dynamic-item",
  403. },
  404.  
  405. //类似于百度
  406. //阅读全文
  407. {
  408. type: "display",
  409. item: ".packupButton",
  410. },
  411. {
  412. type: "height",
  413. item: ".mainContent",
  414. },
  415. ],
  416. },
  417. {
  418. name: "百度资讯",
  419. url: "m.baidu.com/sf_baijiahao",
  420. handles: [
  421. //展开全文
  422. {
  423. type: "display",
  424. item: ".oPadding",
  425. },
  426. {
  427. type: "height",
  428. item: ".mainContent",
  429. },
  430. ],
  431. },
  432. {
  433. name: "百度新闻",
  434. url: "news.baidu.com/news#/detail",
  435. handles: [
  436. //阅读全文
  437. {
  438. type: "display",
  439. item: ".show-more-btn-container",
  440. },
  441. {
  442. type: "display",
  443. item: ".show-more-end",
  444. },
  445. {
  446. type: "height",
  447. item: ".detail-content-main",
  448. },
  449. ],
  450. },
  451. {
  452. name: "新浪新闻",
  453. url: "sina.cn",
  454. handles: [
  455. //展开
  456. {
  457. type: "display",
  458. item: ".look_more",
  459. },
  460. {
  461. type: "height",
  462. item: ".s_card",
  463. },
  464. ],
  465. },
  466. {
  467. name: "网易新闻",
  468. url: "3g.163.com",
  469. handles: [
  470. //展开
  471. {
  472. type: "display",
  473. item: ".show_article",
  474. },
  475. {
  476. type: "height",
  477. item: "article",
  478. },
  479. ],
  480. },
  481. {
  482. name: "搜狐新闻",
  483. url: "sohu.com/a",
  484. handles: [
  485. //展开
  486. {
  487. type: "display",
  488. item: ".lookall-box",
  489. },
  490. ],
  491. fun: function () {
  492. let item = document.querySelector(".hidden-content");
  493. //移动版
  494. item.classList.remove("hide");
  495. //pc版
  496. item.classList.remove("control-hide");
  497. },
  498. },
  499. {
  500. name: "腾讯新闻",
  501. url: "view.inews.qq.com/",
  502. handles: [
  503. //点击展开全文
  504. {
  505. type: "display",
  506. item: "[class^=show-more_outer__]",
  507. },
  508. {
  509. type: "display",
  510. item: "[class^=show-more-article_cover__]",
  511. },
  512. {
  513. type: "height",
  514. item: "[class^=show-more_height-not-full__]",
  515. },
  516. ],
  517. },
  518. {
  519. name: "凤凰新闻",
  520. url: "ifeng.com/",
  521. handles: [
  522. //点击查看完整内容(房子)
  523. {
  524. type: "display",
  525. item: ".showall",
  526. },
  527. {
  528. type: "height",
  529. item: ".article",
  530. },
  531. //点击展开全文(资讯)
  532. {
  533. type: "display",
  534. item: "[class^=tip]",
  535. },
  536. //展开全文(汽车)
  537. {
  538. type: "display",
  539. item: "[class^=more]",
  540. },
  541. {
  542. type: "height",
  543. item: "[class^=main_content]",
  544. },
  545. //展开(财经视频介绍)
  546. {
  547. type: "click",
  548. item: "[class^=videoBrefTextBtn-]",
  549. },
  550. ],
  551. },
  552. {
  553. name: "澎湃新闻",
  554. url: "m.thepaper.cn/newsDetail_forward",
  555. handles: [
  556. //展开全文
  557. {
  558. type: "display",
  559. item: "#clickForMore",
  560. },
  561. {
  562. type: "height",
  563. item: ".newsdetail_body",
  564. },
  565. ],
  566. },
  567. {
  568. name: "新京报",
  569. url: "m.bjnews.com.cn/detail/",
  570. handles: [
  571. //展开全文
  572. {
  573. type: "display",
  574. item: ".shade",
  575. },
  576. {
  577. type: "height",
  578. item: ".article",
  579. },
  580. ],
  581. },
  582. {
  583. name: "环球网1",
  584. url: "huanqiu.com/article/",
  585. handles: [
  586. //展开全文
  587. {
  588. type: "click",
  589. item: ".unfold-btn",
  590. },
  591. ],
  592. },
  593. {
  594. name: "环球网2",
  595. url: "3w.huanqiu.com/a/",
  596. handles: [
  597. //展开全文
  598. {
  599. type: "click",
  600. item: "#more",
  601. },
  602. ],
  603. },
  604. {
  605. name: "丁香园",
  606. url: "3g.dxy.cn",
  607. handles: [
  608. //显示第一条评论
  609. {
  610. type: "height",
  611. item: ".dicussion-text",
  612. },
  613. //展开阅读全文
  614. {
  615. type: "display",
  616. item: "[class^=contentWrapBottom___]",
  617. },
  618. {
  619. type: "height",
  620. item: "[class^=contentWrap___]",
  621. },
  622. ],
  623. },
  624. {
  625. name: "健康界",
  626. url: "www.cn-healthcare.com/",
  627. handles: [
  628. //阅读全文
  629. {
  630. type: "display",
  631. item: ".mask",
  632. },
  633. {
  634. type: "height",
  635. item: "#artbody",
  636. },
  637. ],
  638. },
  639. {
  640. //https://www.bilibili.com/read/mobile?id=18846196
  641. name: "B站专栏",
  642. url: "www.bilibili.com/read/mobile",
  643. handles: [
  644. //继续阅读全文
  645. {
  646. type: "display",
  647. item: ".read-more",
  648. },
  649. ],
  650. fun: function () {
  651. let item = document.querySelector(".read-article-box");
  652. item.classList.remove("limit");
  653. item.classList.remove("show-later");
  654. },
  655. },
  656. {
  657. //https://weibo.com/ttarticle/p/show?id=2309404770482854428687
  658. name: "微博文章PC版",
  659. url: "weibo.com/ttarticle/p/show?id=",
  660. handles: [
  661. {
  662. type: "height",
  663. item: ".WB_editor_iframe_new",
  664. },
  665. {
  666. type: "display",
  667. item: ".btn_line",
  668. },
  669. ],
  670. },
  671. {
  672. //https://card.weibo.com/article/m/show/id/2309404770482854428687
  673. name: "微博文章移动版",
  674. url: "card.weibo.com/article/m/show/id",
  675. handles: [
  676. {
  677. type: "height",
  678. item: ".f-art",
  679. },
  680. {
  681. type: "display",
  682. item: ".f-art-opt",
  683. },
  684. ],
  685. },
  686. {
  687. name: "豆瓣文章",
  688. url: "m.douban.com/book/review/",
  689. handles: [
  690. //点击展开全文
  691. {
  692. type: "display",
  693. item: ".oia-readall",
  694. },
  695. {
  696. type: "height",
  697. item: ".note-content",
  698. },
  699. ],
  700. },
  701. {
  702. name: "豆瓣小组",
  703. url: "m.douban.com/group/topic/",
  704. handles: [
  705. //点击展开全文
  706. {
  707. type: "display",
  708. item: ".oia-readall",
  709. },
  710. {
  711. type: "height",
  712. item: ".note-content",
  713. },
  714. ],
  715. },
  716. {
  717. //https://www.oschina.net/p/xmind
  718. name: "开源中国",
  719. url: "www.oschina.net/p/",
  720. handles: [
  721. //展开阅读全文
  722. {
  723. type: "display",
  724. item: ".collapse-bar",
  725. },
  726. {
  727. type: "height",
  728. item: ".article-detail",
  729. },
  730. ],
  731. },
  732. {
  733. name: "阿里云开发者社区",
  734. url: "developer.aliyun.com/article",
  735. handles: [
  736. //关注
  737. {
  738. type: "height",
  739. item: ".article-hide-content",
  740. },
  741. {
  742. type: "display",
  743. item: ".article-hide-box",
  744. },
  745. ],
  746. },
  747. {
  748. name: "腾讯云开发者社区",
  749. url: "cloud.tencent.com/developer/article/",
  750. handles: [
  751. //展开阅读全文
  752. {
  753. type: "height",
  754. item: ".com-markdown-collpase-main",
  755. },
  756. {
  757. type: "display",
  758. item: ".com-markdown-collpase-toggle",
  759. },
  760. ],
  761. },
  762. //移动版:http://www.360doc.cn/article/60244337_924865821.html
  763. {
  764. name: "360图书馆手机版",
  765. url: "www.360doc.cn/article/",
  766. handles: [
  767. //移动版:展开剩余内容
  768. {
  769. type: "display",
  770. item: ".article_showall",
  771. },
  772. {
  773. type: "height",
  774. item: ".article",
  775. },
  776. ],
  777. },
  778. //PC版:http://www.360doc.com/content/20/0717/15/60244337_924865821.shtml
  779. {
  780. name: "360图书馆PC版",
  781. url: "www.360doc.com/content/",
  782. handles: [
  783. //展开
  784. // {
  785. // type: "display",
  786. // item: ".article_showall",
  787. // },
  788. ],
  789. fun: function () {
  790. let item = document.querySelector("body");
  791. item.classList.remove("articleMaxH");
  792. },
  793. },
  794. {
  795. //https://g.pconline.com.cn/x/1504/15043167.html
  796. name: "太平洋电脑网",
  797. url: "g.pconline.com.cn/x/",
  798. handles: [
  799. //展开全文
  800. {
  801. type: "display",
  802. item: ".show_article",
  803. },
  804. {
  805. type: "height",
  806. item: ".art-content",
  807. },
  808. ],
  809. },
  810. {
  811. //https://m.zol.com.cn/article/7934726.html
  812. name: "中关村在线",
  813. url: "m.zol.com.cn/article/",
  814. handles: [
  815. //展开全文
  816. {
  817. type: "display",
  818. item: ".unfold-article-btn",
  819. },
  820. {
  821. type: "height",
  822. item: ".article-content",
  823. },
  824. ],
  825. },
  826. {
  827. name: "汽车之家:新闻",
  828. url: "m.autohome.com.cn/news/",
  829. handles: [
  830. //点击展开剩余部分
  831. {
  832. type: "display",
  833. item: "#continue_reading",
  834. },
  835. ],
  836. fun: function () {
  837. //删除class
  838. let items = document.querySelectorAll("#content .fn-hide");
  839. for (let item of items) {
  840. item.classList.remove("fn-hide");
  841. }
  842. },
  843. },
  844. {
  845. name: "汽车之家:车家号",
  846. url: "chejiahao.m.autohome.com.cn/info/",
  847. handles: [
  848. //点击展开剩余部分
  849. {
  850. type: "display",
  851. item: "#continue_reading_new",
  852. },
  853. ],
  854. fun: function () {
  855. //删除class
  856. let items = document.querySelectorAll(".pgc-details .fn-hide");
  857. for (let item of items) {
  858. item.classList.remove("fn-hide");
  859. }
  860. },
  861. },
  862. {
  863. name: "汽车之家:论坛",
  864. url: "club.m.autohome.com.cn/bbs/",
  865. handles: [
  866. //点击展开剩余部分
  867. {
  868. type: "display",
  869. item: "#continue_reading",
  870. },
  871. {
  872. type: "height",
  873. item: "#topicContentSection",
  874. },
  875. ],
  876. fun: function () {
  877. //删除class
  878. let items = document.querySelectorAll("#topicContentSection .fn-hide");
  879. for (let item of items) {
  880. item.classList.remove("fn-hide");
  881. }
  882. },
  883. },
  884. {
  885. name: "游侠网",
  886. url: "3g.ali213.net",
  887. handles: [
  888. //阅读全文
  889. {
  890. type: "display",
  891. item: ".read-all-con",
  892. },
  893. {
  894. type: "display",
  895. item: ".read-all-con2",
  896. },
  897. {
  898. type: "height",
  899. item: ".detail-content",
  900. },
  901. ],
  902. },
  903. {
  904. name: "360文档",
  905. url: "wenda.so.com/q/",
  906. handles: [
  907. //PC端:展开问答
  908. {
  909. type: "display",
  910. item: ".answer-part__has-folder__btn",
  911. },
  912. {
  913. type: "height",
  914. item: ".answer-part__has-folder",
  915. },
  916. //PC端:更多回答
  917. {
  918. type: "display",
  919. item: ".js-unfold-page",
  920. },
  921. //展开完整答案
  922. {
  923. type: "display",
  924. item: ".overflow-cover",
  925. },
  926. {
  927. type: "height",
  928. item: ".max-height",
  929. },
  930. //更多回答
  931. {
  932. type: "display",
  933. item: ".js-rest-icon",
  934. },
  935. ],
  936. fun: function () {
  937. //PC端:更多回答
  938. let item1s = document.querySelectorAll(".hide.js-unfold-answer.answer-fold-box");
  939. for (let item of item1s) {
  940. item.classList.remove("hide");
  941. }
  942. //更多回答
  943. let item2s = document.querySelectorAll(".ans-box.hide");
  944. for (let item of item2s) {
  945. item.classList.remove("hide");
  946. }
  947. },
  948. },
  949. {
  950. name: "天眼查",
  951. url: "n.tianyancha.com/content",
  952. handles: [
  953. //展开剩余内容
  954. {
  955. type: "display",
  956. item: "[class^=index_other-content-more__]",
  957. },
  958. {
  959. type: "height",
  960. item: "[class^=index_other-content-container__]",
  961. },
  962. ],
  963. },
  964. {
  965. name: "天涯社区",
  966. url: "bbs.tianya.cn/m/",
  967. handles: [
  968. //点击展开完整贴文
  969. {
  970. type: "display",
  971. item: ".openFullPost",
  972. },
  973. {
  974. type: "height",
  975. item: ".onhide",
  976. },
  977. ],
  978. //删除透明遮挡
  979. fun: function () {
  980. let css = document.createElement("style");
  981. css.innerHTML = ".item-lz .bd.onhide:before{content:none}";
  982. document.head.append(css);
  983. },
  984. },
  985. {
  986. name: "东方财富网",
  987. url: "wap.eastmoney.com/a/",
  988. handles: [
  989. //点击展开完整贴文
  990. {
  991. type: "display",
  992. item: ".fold-btn",
  993. },
  994. {
  995. type: "display",
  996. item: ".fold-arrow",
  997. },
  998. {
  999. type: "height",
  1000. item: "#articleContent",
  1001. },
  1002. //删除透明遮挡
  1003. {
  1004. type: "display",
  1005. item: ".fold-mask",
  1006. },
  1007. ],
  1008. },
  1009. {
  1010. name: "东方财富网:社区",
  1011. url: "emcreative.eastmoney.com/",
  1012. handles: [
  1013. //点击阅读全文
  1014. {
  1015. type: "display",
  1016. item: ".my_ad_wrap",
  1017. },
  1018. {
  1019. type: "height",
  1020. item: "#text-content",
  1021. },
  1022. ],
  1023. },
  1024. {
  1025. name: "东方财富网:股吧",
  1026. url: "mguba.eastmoney.com/",
  1027. handles: [
  1028. //点击阅读全文
  1029. {
  1030. type: "display",
  1031. item: "#foldup_box",
  1032. },
  1033. {
  1034. type: "height",
  1035. item: "#content",
  1036. },
  1037. ],
  1038. },
  1039. {
  1040. name: "程序猿DD",
  1041. url: "blog.didispace.com",
  1042. handles: [
  1043. //阅读全文,人机检测
  1044. {
  1045. type: "display",
  1046. item: "#read-more-wrap",
  1047. },
  1048. {
  1049. type: "height",
  1050. item: ".article",
  1051. },
  1052. ],
  1053. },
  1054. {
  1055. name: "好网角收藏夹",
  1056. url: "wang1314.com/doc",
  1057. handles: [
  1058. //PC端:阅读全文,人机检测
  1059. {
  1060. type: "display",
  1061. item: "#show_content_bar",
  1062. },
  1063. {
  1064. type: "height",
  1065. item: "#art_body",
  1066. },
  1067. //阅读原文全部内容
  1068. {
  1069. type: "display",
  1070. item: "#show_content_bar",
  1071. },
  1072. {
  1073. type: "height",
  1074. item: "#body_content",
  1075. },
  1076. ],
  1077. },
  1078. {
  1079. name: "科中资源网",
  1080. url: "k4china.com",
  1081. handles: [
  1082. //点击阅读全文
  1083. {
  1084. type: "click",
  1085. item: ".readmore",
  1086. },
  1087. ],
  1088. },
  1089. {
  1090. name: "tofacebook",
  1091. url: "www.tofacebook.com",
  1092. handles: [
  1093. //阅读全部
  1094. {
  1095. type: "height",
  1096. item: ".panel-default",
  1097. },
  1098. {
  1099. type: "display",
  1100. item: ".more-box",
  1101. },
  1102. ],
  1103. },
  1104. ];
  1105. let time = 0;
  1106. let interval = setInterval(() => {
  1107. if (++time == 100) {
  1108. clearInterval(interval);
  1109. }
  1110. for (let website of websites) {
  1111. if (location.href.indexOf(website.url) != -1) {
  1112. if (website.fun) {
  1113. website.fun();
  1114. }
  1115. for (let handle of website.handles) {
  1116. let items = document.querySelectorAll(handle.item);
  1117. if (items.length != 0) {
  1118. if (handle.type == "display") {
  1119. //隐藏遮挡部分
  1120. for (let item of items) {
  1121. item.style.display = "none";
  1122. }
  1123. } else if (handle.type == "height") {
  1124. //加长内容部分
  1125. for (let item of items) {
  1126. item.style.setProperty("height", "unset", "important");
  1127. item.style.setProperty("max-height", "unset", "important");
  1128. item.style.setProperty("max-height", "unset", "important");
  1129. }
  1130. } else if (handle.type == "overflow") {
  1131. //防止无法滑动
  1132. for (let item of items) {
  1133. item.style.setProperty("overflow", "unset", "important");
  1134. }
  1135. } else {
  1136. //模拟点击,后续可能取消
  1137. for (let item of items) {
  1138. if (item != null && item.getAttribute("opened") != "yes") {
  1139. item.click();
  1140. item.setAttribute("opened", "yes");
  1141. }
  1142. }
  1143. }
  1144. }
  1145. }
  1146. }
  1147. }
  1148. }, 100);
  1149. })();

QingJ © 2025

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