CSDN Filter

Simplify CSDN

As of 2021-10-19. See the latest version.

  1. // ==UserScript==
  2.  
  3. // ==Script==
  4. // @name CSDN Filter
  5. // @icon https://g.csdnimg.cn/static/logo/favicon32.ico
  6. // @description Simplify CSDN
  7.  
  8. // ==Config==
  9. // @include *://*.csdn.net/*
  10. // @connect www.csdn.net
  11.  
  12. // ==Require==
  13.  
  14. // ==Author==
  15. // @author Gitsang
  16. // @version 0.0.1.211019
  17. // @namespace https://github.com/gitsang
  18.  
  19. // ==/UserScript==
  20.  
  21. var version = "0.0.1";
  22.  
  23. (
  24. function() {
  25. var style = document.createElement("style");
  26. style.type = "text/css";
  27.  
  28. // AD block
  29. var adStyle = document.createTextNode("#dmp_ad_58, .recommendAdBox, #recommendAdBox, #kp_box_479{display: none!important;}");
  30. style.appendChild(adStyle);
  31.  
  32. // left aside
  33. var asideStyle = document.createTextNode(".blog_container_aside {display: none!important;}")
  34. style.appendChild(asideStyle);
  35.  
  36. // side bar
  37. var sideBarStyle = document.createTextNode(".csdn-common-logo-advert, .csdn-side-toolbar{display: none!important;}");
  38. style.appendChild(sideBarStyle);
  39.  
  40. // top bar
  41. var topBarStyle = document.createTextNode(".toolbar-advert .toolbar-btn-vip, [title=马上开始系统学习]{display: none!important;}");
  42. style.appendChild(topBarStyle);
  43.  
  44. // footer block
  45. var footerStyle = document.createTextNode(".blog-footer-bottom, .template-box, .recommend-tit-mod, .second-recommend-box, .more-toolbox-new{display: none!important;}");
  46. style.appendChild(footerStyle);
  47.  
  48. // recommand style
  49. var recommandStyle = document.createTextNode(".recommend-box, .insert-baidu-box{display: none!important;}");
  50. style.appendChild(recommandStyle);
  51.  
  52. // comment style
  53. var commentStyle = document.createTextNode(".comment-box .comment-edit-box form .comment-content.open{height: 300px!important;}");
  54. style.appendChild(commentStyle);
  55.  
  56. // main width
  57. var mainStyle = document.createTextNode("main{width: 100%!important;");
  58. style.appendChild(mainStyle);
  59.  
  60. var head = document.getElementsByTagName("head")[0];
  61. head.appendChild(style);
  62. }
  63. )();