干净的百度翻译

去除百度翻译的广告

  1. // ==UserScript==
  2. // @name 干净的百度翻译
  3. // @namespace http://tampermonkey.net/
  4. // @version 2024-07-23
  5. // @description 去除百度翻译的广告
  6. // @author You
  7. // @match https://fanyi.baidu.com/*
  8. // @icon https://fanyi.baidu.com/favicon.ico
  9. // @grant none
  10. // @run-at document-end
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. // 等待页面加载完成
  17. window.addEventListener('load', function() {
  18. // 设置定时器,等待2秒后执行
  19. setTimeout(function() {
  20. // 检查元素是否存在
  21. var element = document.querySelector("#multiContainer > div:nth-child(2)");
  22. if (element) {
  23. // 隐藏元素
  24. debugger
  25. element.style.display = 'none';
  26. var a = document.querySelector("#root > div:nth-child(2)");
  27. if(a){
  28. a.style.display = 'none';
  29. }
  30.  
  31. var b = document.querySelector("#multiContainer > div.ZHrlRAUU > div > div.sF3Yx_p0");
  32. if(b){
  33. b.style.display = 'none';
  34. }
  35. }
  36. }, 400); // 400毫秒
  37. });
  38. })();

QingJ © 2025

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