Remove AD on Yeeach

删除 https://yeeach.com/ 页面中的 /html/body/div[2] 元素

  1. // ==UserScript==
  2. // @name Remove AD on Yeeach
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description 删除 https://yeeach.com/ 页面中的 /html/body/div[2] 元素
  6. // @author You
  7. // @match https://yeeach.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // 等待页面加载完成
  15. window.addEventListener('load', function() {
  16. // 使用 XPath 查找目标元素
  17. let targetElement = document.evaluate(
  18. '/html/body/div[2]',
  19. document,
  20. null,
  21. XPathResult.FIRST_ORDERED_NODE_TYPE,
  22. null
  23. ).singleNodeValue;
  24.  
  25. // 如果找到元素,则删除
  26. if (targetElement) {
  27. targetElement.remove();
  28. console.log('已删除 /html/body/div[2] 元素');
  29. } else {
  30. console.log('未找到 /html/body/div[2] 元素');
  31. }
  32. });
  33. })();

QingJ © 2025

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