去除北京时间百度推广

去除北京时间的百度推广广告

  1. // ==UserScript==
  2. // @name 去除北京时间百度推广
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description 去除北京时间的百度推广广告
  6. // @author ljh
  7. // @match https://www.baidu.com/s?*
  8. // @match https://m.baidu.com/*
  9. // @match https://blog.csdn.net/*
  10. // @match http://aoyouzi.iteye.com/*
  11. // @match https://www.btime.com/*
  12. // @match http://www.btime.com/*
  13. // @match https://item.btime.com/*
  14. // @match http://item.btime.com/*
  15. // @match http://sh.qihoo.com/*
  16. // @grant none
  17. // ==/UserScript==
  18.  
  19. (function() {
  20. 'use strict';
  21. $("head").append('<style type="text/css">iframe[src^="https://pos.baidu.com"]{display:none !important;} iframe[src^="http://pos.baidu.com"]{display:none !important;} .qihoobannerslider{display:none !important;}</style>');
  22. removeGuangGao();
  23.  
  24. //删除底部的csnd登陆框框
  25. //console.log( $(".pulllog-box"));
  26. $(".pulllog-box").remove();
  27. window.setTimeout(removeGuangGao,1000);
  28. //window.setInterval(removeGuangGao,5000);
  29. })();
  30.  
  31. function removeGuangGao() {
  32. var filter = $("iframe");
  33. for (var i = 0; i < filter.length; i++) {
  34. var src = $(filter[i]).attr("src");
  35. if (src != null && src.indexOf("pos.baidu.com") > 0) {
  36. $(filter[i]).parent().hide();
  37. filter[i].remove();
  38. //console.log(i);
  39. // console.log($(filter[i]).parent().parent());
  40. // $(filter[i]).parent().parent().remove();
  41. }
  42. }
  43. }
  44.  
  45. window.onload=function(){
  46. removeGuangGao();
  47. }

QingJ © 2025

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