Fuck CSDN

去除CSDN BBS&BLOG&DOWNLOAD&WWW ADP检测/广告/展开全文限制/复制小尾巴/其它

目前为 2019-01-03 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Fuck CSDN
  3. // @version 1.4
  4. // @description 去除CSDN BBS&BLOG&DOWNLOAD&WWW ADP检测/广告/展开全文限制/复制小尾巴/其它
  5. // @author 流星暴雨
  6. // @grant none
  7. // @match http*://blog.csdn.net/*
  8. // @match http*://bbs.csdn.net/*
  9. // @match http*://download.csdn.net/*
  10. // @match http*://www.csdn.net/*
  11. // @run-at document-body
  12. // @homepageURL https://gf.qytechs.cn/scripts/374950
  13. // @supportURL https://gf.qytechs.cn/scripts/374950
  14. // @namespace Eternal
  15. // ==/UserScript==
  16.  
  17. (function () {
  18. 'use strict';
  19. var extension = true; //如为真则开启拓展功能 去除 联系方式/赚零钱/传资源
  20.  
  21. var hook = function () {
  22. window.setInterval_ = setInterval;
  23. var mysetInterval = function (fun, time) {
  24. if ((fun + '').match("check-adblock-time")) {
  25. return null;
  26. } else {
  27. return setInterval_(fun, time);
  28. }
  29. }
  30. setInterval = mysetInterval;
  31. document.body.insertBefore_ = document.body.insertBefore;
  32. var myinsertBefore = function (ele, box) {
  33. if (ele.innerHTML.match("ADP") || ele.innerHTML.match("广告")) {
  34. return document.body;
  35. } else {
  36. return document.body.insertBefore_(ele, box);
  37. }
  38. };
  39. document.body.insertBefore = myinsertBefore;
  40. }
  41.  
  42. var addTimer = function (ele, time, code) {
  43. var i = time == -1 ? undefined : (time ? time : 10000) / 10;
  44. var timer = setInterval(function () {
  45. i--;
  46. if ($(ele).size() > 0 || i < 0) {
  47. clearInterval(timer);
  48. setTimeout(function () {
  49. code && eval(code);
  50. $(ele).remove();
  51. }, 50)
  52. }
  53. }, 10);
  54. }
  55.  
  56. if (location.host.match("blog")) {
  57. $(function () {
  58. $("#article_content").css("height", '');
  59. $(".hide-article-box").remove();
  60. $(".fourth_column").remove();
  61. $(".pulllog-box").remove();
  62. $(".box-shadow").remove();
  63. $(".aside-box > div[data-track-click]").parent().remove();
  64. $(".BAIDU_DUP_fp_wrapper").remove();
  65. $(".adsbygoogle").parent().remove();
  66. $("#commentBox").prev().remove();
  67. $(".recommend-ad-box").remove();
  68. $("#adContent").remove();
  69. $("div[id*='kp_box']").remove();
  70.  
  71. if (csdn.copyright) {
  72. csdn.copyright.init = function () {};
  73. }
  74.  
  75. $("img[onerror]").remove();
  76.  
  77. if (extension) {
  78. $(".gitChat").remove();
  79. $(".persion_article").empty();
  80. }
  81. });
  82. addTimer(".right-item[class*='ads']");
  83. addTimer("#asideFooter > .aside-box:has('iframe')");
  84. addTimer("div[class*='box-box']:has('iframe'):contains('关闭')");
  85.  
  86. hook();
  87. } else if (location.host.match("bbs")) {
  88. $(function () {
  89. $(".post_body > div[scrolling=no]").remove();
  90. $(".bbs_feed_ad_box").remove();
  91. $(".post_body > div").remove();
  92. $(".pulllog-box").remove();
  93. $("#adContent").remove();
  94. $("div[id*='kp_box']").remove();
  95.  
  96. if (extension) {
  97. $(".gitChat").remove();
  98. $(".footer_box").empty();
  99. $(".footer_box").css("visibility", "hidden");
  100. }
  101.  
  102. addTimer(".hide_topic_box", undefined, "$('#bbs_detail_wrap').css('max-height', '')");
  103. });
  104. } else if (location.host.match("download")) {
  105. $(".check-adblock-bg").parent().remove();
  106.  
  107. $(function () {
  108. $(".dl_mar").remove();
  109. $(".right_bottom").remove();
  110. $(".hot_arti_list > div").remove();
  111. $("#adContent").remove();
  112. $("#album_detail_wrap > div:not(.dl_more)").remove();
  113. $(".dl_edu").remove();
  114. $("div[id*='kp_box']").remove();
  115.  
  116. if (extension) {
  117. $(".gitChat").remove();
  118. $(".fixed_dl").remove();
  119. }
  120. });
  121.  
  122. hook();
  123.  
  124. var timer = setInterval(function () {
  125. if (document.body.insertBefore_ == undefined) {
  126. clearInterval(timer);
  127. document.body.insertBefore_ = document.body.insertBefore;
  128. var myinsertBefore = function (ele, box) {
  129. if (ele.innerHTML.match("ADP") || ele.innerHTML.match("广告")) {
  130. return document.body;
  131. } else {
  132. return document.body.insertBefore_(ele, box);
  133. }
  134. };
  135. document.body.insertBefore = myinsertBefore;
  136. }
  137. }, 10);
  138.  
  139. } else if (location.host.match("www")) {
  140. $(function () {
  141. $(".banner-ad-box").remove();
  142. $(".slide-outer").remove();
  143. $(".indexSuperise").remove();
  144. $("div[id*='kp_box']").remove();
  145.  
  146. addTimer("#adContent");
  147.  
  148. if (extension) {
  149. $(".gitChat").remove();
  150. $(".persion_article").empty();
  151. }
  152. });
  153. }
  154.  
  155. console.log("Fuck CSDN!")
  156. })();

QingJ © 2025

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