CSDN净化

CSDN去广告后居中,自动展开,去除剪贴板劫持,免登录(不可用)。请配合ABP规则使用:https://raw.githubusercontent.com/Slaier/AdBlockRule/master/AdBlockCN.txt。

  1. // ==UserScript==
  2. // @name CSDN Clean
  3. // @name:zh-CN CSDN净化
  4. // @namespace https://slaier.github.io/
  5. // @version 1.4
  6. // @author slaier
  7. // @description csdn align center, auto readmore, clean clipboard, no login.
  8. // @description:zh-cn CSDN去广告后居中,自动展开,去除剪贴板劫持,免登录(不可用)。请配合ABP规则使用:https://raw.githubusercontent.com/Slaier/AdBlockRule/master/AdBlockCN.txt。
  9. // @include https://blog.csdn.net/*/article/details/*
  10. // @grant GM_addStyle
  11. // @icon https://csdnimg.cn/public/favicon.ico
  12. // @run-at document-idle
  13. // ==/UserScript==
  14.  
  15. (function () {
  16. 'use strict';
  17. console.log(` %c CSDN净化 %c https://slaier.github.io/ `, `color: #fadfa3; background: #23b7e5; padding:5px;`, `background: #1c2b36; padding:5px;`);
  18. if (navigator.userAgent.indexOf("Android") > -1){ // 安卓
  19. $(".article_content").removeAttr("style"),
  20. $(".readall_box").show().addClass("readall_box_nobg"),
  21. $(".readall_box").hide().addClass("readall_box_nobg");
  22. GM_addStyle('body { padding-bottom: 0 !important;}');
  23. $(".view_comment>a").text("展开所有评论");
  24. }
  25. else {
  26. console.log("请配合ABP规则使用:https://raw.githubusercontent.com/Slaier/AdBlockRule/master/AdBlockCN.txt");
  27. GM_addStyle('* { margin: auto; padding: 0;}');
  28. GM_addStyle('main { float: unset;}');
  29. localStorage.setItem("anonymousUserLimit", ""); // 免登陆
  30. csdn.clearReadMoreBtn(); // 自动展开
  31. $("#btnMoreComment>span").remove(); // 登录(不可用)误触
  32. if (csdn.copyright){
  33. csdn.copyright.init("", "", ""); //去除剪贴板劫持
  34. }
  35. }
  36. })();

QingJ © 2025

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