Fucking CSDN

like the name of this script ..

  1. // ==UserScript==
  2. // @name Fucking CSDN
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description like the name of this script ..
  6. // @author J
  7. // @match https://blog.csdn.net/*/article/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15. document.getElementById("csdn-toolbar")?.setAttribute("style","display:none;");
  16. document.getElementById("toolBarBox")?.setAttribute("style","display:none;");
  17. document.getElementsByClassName("blog_container_aside")[0].innerHTML="<span></span>";
  18. document.getElementsByClassName("csdn-side-toolbar")[0].setAttribute("style","display:none;");
  19. var leveTwo = document.getElementById("blogColumnPayAdvert")?.setAttribute("style","display:none");
  20. document.getElementsByTagName("main")[0].setAttribute("style","width:100%;margin:0;")
  21. var newElHtml = "";
  22. var nickName = document.getElementsByClassName("follow-nickName ")[0];
  23. var path = nickName.getAttribute("href");
  24. var txt = nickName.innerHTML;
  25. newElHtml+="<span style='height: 20px;background-color: #3271ae;color:#ffffff;padding: 4px;font-size: 12px;font-weight: bold;border-radius: 5px;margin: 0 5px;'>Author:<a style='color:#ffffff;' href=''"+path+"''>"+txt+"</a></span>";
  26. var timeTxt = document.getElementsByClassName("time")[0].innerHTML;
  27. var time = timeTxt.substring(8,timeTxt.length-8);
  28. newElHtml+="<span style='height: 20px;background-color: #007175;color:#ffffff;padding: 4px;font-size: 12px;font-weight: bold;border-radius: 5px;margin: 0 5px;'>PostTime:"+time+"</span>";
  29. var readCount = document.getElementsByClassName("read-count")[0].innerHTML;
  30. newElHtml+="<span style='height: 20px;background-color: #d23918;color:#ffffff;padding: 4px;font-size: 12px;font-weight: bold;border-radius: 5px;margin: 0 5px;' >ReadCount:"+readCount+"</span>";
  31. var tags = document.getElementsByClassName("tag-link");
  32. if(tags.length > 0){
  33. newElHtml +="<span style='height: 20px;background-color: #d9883d;color:#ffffff;padding: 4px;font-size: 12px;font-weight: bold;border-radius: 5px;margin: 0 5px;' > Tags:";
  34. for (let i = 0; i < tags.length; i++) {
  35. var href = tags[i].getAttribute("href");
  36. var t = tags[i].innerHTML;
  37. newElHtml+="<a style='border: 1px solid #fff;color: white;border-radius: 3px;padding: 1px;margin: 0 5px;' href='"+href+"'>"+t+"</a>";
  38. }
  39. newElHtml +="</span>";
  40. }
  41. var el = document.getElementsByClassName("article-info-box")[0];
  42. el.innerHTML=newElHtml;
  43. el.setAttribute('style','background-color:rgba(0,0,0,0);');
  44. document.getElementsByClassName("article-header-box")[0].setAttribute('style','border-bottom:0;');
  45. })();

QingJ © 2025

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