CSDN Focus

纯CSS 展开页面文章和全部带翻页评论, 其他全部隐藏, 只在CSDN文章页运行, 沉浸式体验|页面start状态注入样式, 页面不重绘, 提升观感. 因此本脚本不会使用js修改功能, 如有需求会另行开发js增强版本,欢迎👏提交意见反馈,顺便点个star👍...

当前为 2021-01-18 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name CSDN Focus
  3. // @namespace https://github.com/Germxu
  4. // @version 0.3
  5. // @description 纯CSS 展开页面文章和全部带翻页评论, 其他全部隐藏, 只在CSDN文章页运行, 沉浸式体验|页面start状态注入样式, 页面不重绘, 提升观感. 因此本脚本不会使用js修改功能, 如有需求会另行开发js增强版本,欢迎👏提交意见反馈,顺便点个star👍...
  6. // @description:en CSDN cleaner with css. If it help, star on github will be excellent 😄
  7. // @author Finn
  8. // @homepage https://github.com/Germxu/Scripts-for-TamperMonkey
  9. // @supportURL https://github.com/Germxu/Scripts-for-TamperMonkey/issues/new
  10. // @run-at document-start
  11. // @match blog.csdn.net/*/article/details/*
  12. // @match *.blog.csdn.net/article/details/*
  13. // @grant GM_addStyle
  14. // @license MIT
  15. // ==/UserScript==
  16.  
  17. (function () {
  18. /*
  19. 页面重新加载太不爽了, 我不喜欢, 希望您也一样, 如有增强功能需求, 请提交issue, 顺便点个赞👍, 如果呼声强烈, 我会考虑制作js版本😄
  20. 后续本脚本会考虑支持其他网站净化, 但也是使用CSS, 避免js加载导致的页面重绘
  21. 隐藏头部, 底部, 登录窗口, 左侧信息, 页面广告, 推荐阅读, 页面提示等等
  22. 展开全部文章, 展开评论, 显示评论切换翻页按钮
  23. 只删减, 不添加其他内容
  24. */
  25. 'use strict';
  26. const hideChaos = `
  27. #csdn-toolbar, #blogColumnPayAdvert, .csdn-side-toolbar, aside, #dmp_ad_58,
  28. .recommend-box, .login-mark, .blog-footer-bottom, .template-box,.leftPop,
  29. #toolBarBox, .comment-edit-box.d-flex, #passportbox, .opt-box.text-center,
  30. .hide-article-box.hide-article-pos.text-center
  31. {display:none!important;}
  32. .d-flex{display:block!important}
  33. .main_father{height: auto !important;}
  34. main{width:100%!important; box-shadow: 0 0 30px #959fa378; margin-bottom:0!important;}
  35. #mainBox{margin:30px auto 50px; width:1000px!important}
  36. .comment-list-box{max-height:none!important}
  37. #commentPage{display:block!important}
  38. #article_content{height:auto !important}
  39. .comment-list-container{padding: 4px 0!important}
  40. .article-header-box{padding-top: 18px !important}
  41. main .comment-box{padding: 0;box-shadow: 0 0 10px rgba(0,0,0,0.05);margin:8px 0;}
  42. `;
  43.  
  44. GM_addStyle(hideChaos)
  45. })();