fuck_geek-share.com

fuck_geek-share.com,移除页面推广信息

  1. // ==UserScript==
  2. // @name fuck_geek-share.com
  3. // @namespace https://github.com/geekyouth/
  4. // @version 1.0
  5. // @description fuck_geek-share.com,移除页面推广信息
  6. // @author GeekYouth
  7. // @match https://www.geek-share.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11.  
  12. (function() {
  13.  
  14.  
  15. var f1 = function loop() {
  16. var xxoo1 = document.querySelector("body > div.ThinkBox-wrapper.ThinkBox-default");
  17. var xxoo2 = document.querySelector("body > div.ThinkBox-modal-blackout.ThinkBox-modal-blackout-default");
  18. if (xxoo1) {
  19. console.log("检测到 xxoo1,开始删除=====================");
  20. xxoo1.remove();
  21. } else {
  22. console.log("xxoo1 不存在 ===========================");
  23. }
  24. if (xxoo2) {
  25. console.log("检测到 xxoo2,开始删除=====================");
  26. xxoo2.remove();
  27. } else {
  28. console.log("xxoo2 不存在 ===========================");
  29. }
  30.  
  31. xxoo1 = document.querySelector("body > div.ThinkBox-wrapper.ThinkBox-default");
  32. xxoo2 = document.querySelector("body > div.ThinkBox-modal-blackout.ThinkBox-modal-blackout-default");
  33. if (!xxoo1 || !xxoo2) {
  34. console.log("xxoo 都不在 ===============================");
  35. } else {
  36. console.log("删除失败了 ================== 等一秒递归 ");
  37. setTimeout(f1, 1000);
  38. }
  39.  
  40. }
  41.  
  42. //如果网页加载很慢,这里的延时可以适当调大
  43. setTimeout(f1, 2000);
  44.  
  45. })();