简书去广告

简书自动关闭广告,

  1. // ==UserScript==
  2. // @name 简书去广告
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2
  5. // @description 简书自动关闭广告,
  6. // @author bigMonkey666
  7. // @match https://www.jianshu.com/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=jianshu.com
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15. // Your code here...
  16. console.log('======清除广告开始======');
  17. let count = 0;
  18. let s = setInterval(()=>{
  19. count += 1;
  20. let imgList = document.querySelectorAll('img');
  21. for(let i = 0;i<imgList.length;i++){
  22. const item = imgList[i];
  23. if(item.src.indexOf('close')!==-1||item.src.indexOf('closeb')!==-1){
  24. item.click();
  25. }
  26. }
  27. let b = false;
  28. imgList.forEach(item=>{
  29. if(item.src.indexOf('close')===-1&&item.src.indexOf('closeb')===-1){
  30. b=true
  31. }
  32. })
  33. if(b&&count===10){
  34. console.log('======清除广告结束======');
  35. clearInterval(s);
  36. }
  37. },500);
  38. })();

QingJ © 2025

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