Fuck CSDN

Fuck CSDN!

As of 2018-12-05. See the latest version.

  1. // ==UserScript==
  2. // @name Fuck CSDN
  3. // @version 0.9
  4. // @description Fuck CSDN!
  5. // @author 流星暴雨
  6. // @grant none
  7. // @match http*://blog.csdn.net/*
  8. // @match http*://bbs.csdn.net/*
  9. // @run-at document-body
  10. // @homepageURL https://greatest.deepsurf.us/scripts/374950
  11. // @supportURL https://greatest.deepsurf.us/scripts/374950
  12. // @namespace Eternal
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. 'use strict';
  17. var extension = true;//如为真则开启拓展功能 去除 联系方式/赚零钱/传资源
  18.  
  19. if(location.host.match("blog")){
  20. $(function() {
  21. $("#article_content").css("height",'');
  22. $(".hide-article-box").remove();
  23. $(".fourth_column").remove();
  24. $(".pulllog-box").remove();
  25. $(".box-shadow").remove();
  26. $(".aside-box > div[data-track-click]").parent().remove();
  27. $(".BAIDU_DUP_fp_wrapper").remove();
  28. $(".adsbygoogle").parent().remove();
  29. $("#commentBox").prev().remove();
  30. $(".recommend-ad-box").remove();
  31. $("#adContent").remove();
  32.  
  33. if(extension){
  34. $(".gitChat").remove();
  35. $("#asideFooter").remove();
  36. }
  37. });
  38. var timer1=setInterval(function (){
  39. if($(".right-item[id]").size()>0){
  40. clearInterval(timer1);
  41. setTimeout(function (){
  42. $(".right-item[id]").remove();
  43. },50)
  44. }
  45. },10);
  46. window.setInterval_=setInterval;
  47. document.body.insertBefore_=document.body.insertBefore;
  48. var timer;
  49. var mysetInterval=function (fun,time){
  50. //console.log(fun+'');
  51. if((fun+'').match("check-adblock-time")){
  52. //$(".adblock").remove();
  53. //"function" == typeof window.csdn.insertcallbackBlock && window.csdn.insertcallbackBlock();
  54. /*timer=setInterval_(function (){
  55. if($(".check-adblock-bg").size()>0){
  56. clearInterval(timer);
  57. $(".check-adblock-bg").parent().remove();
  58. }
  59. },10);*/
  60. return null;
  61. }else{
  62. return setInterval_(fun,time);
  63. }
  64. }
  65. var myinsertBefore=function (ele,box){
  66. //console.log(ele.innerHTML);
  67. if(ele.innerHTML.match("ADP")||ele.innerHTML.match("广告")){
  68. return document.body;
  69. }else{
  70. return document.body.insertBefore_(ele,box);
  71. }
  72. };
  73. document.body.insertBefore=myinsertBefore;
  74. setInterval=mysetInterval;}else if(location.host.match("bbs")){
  75. $(function() {
  76. $(".post_body > div[scrolling=no]").remove();
  77. $(".bbs_feed_ad_box").remove();
  78. if(extension){
  79. $(".gitChat").remove();
  80. $(".footer_box").empty();
  81. $(".footer_box").css("visibility","hidden");
  82. }
  83.  
  84. var timer2=setInterval(function (){
  85. if($(".hide_topic_box").size()>0){
  86. clearInterval(timer2);
  87. $("#bbs_detail_wrap").css("max-height",'');
  88. $(".hide_topic_box").remove();
  89. $(".post_body > div").remove();
  90. $(".pulllog-box").remove();
  91. $("#adContent").remove();
  92. }
  93. },10);
  94. });
  95. }
  96.  
  97. console.log("Fuck CSDN!")
  98. })();