AV_AD_Block

missav

目前为 2022-10-20 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name AV_AD_Block
  3. // @description missav
  4. // @icon https://static.missav.com/img/favicon.png
  5. // @namespace loadingi.local
  6. // @version 0.6
  7. // @author ch
  8. // @match https://missav.com/*
  9. // @grant GM_setValue
  10. // @grant GM_getValue
  11. // @grant GM_xmlhttpRequest
  12. // @license GPL-3.0-only
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. 'use strict';
  17. console.log('running')
  18. ////missav.com
  19. //Block OnceClick PopUp
  20. var elem0 = document.querySelector("div.flex-1.order-first").children[0]
  21. elem0.removeAttribute('x-init')
  22. elem0.removeAttribute('x-data')
  23. var elem1 = document.querySelector("div.relative.-mx-4.-mt-6.sm\\:m-0").children[0]
  24. elem1.removeAttribute(elem1.attributes[0].name)
  25. elem1.removeAttribute('@click.once')
  26. //Block GIF AD
  27. var elmt1 = document.querySelector('div.space-y-5.mb-5')
  28. var elmt2 = document.querySelector('div.under_player')
  29. var elmt3 = document.querySelector("iframe")
  30. function blockgif(){
  31. for (var i = 1; i<10; i++){
  32. var obj = eval('elmt'+i)
  33. if(obj){
  34. console.log(obj)
  35. obj.remove()
  36. }else{break}
  37. }
  38. }
  39. //Block Video AD
  40. var elem004 = document.querySelector("button[class^=close-button]")
  41. //LOOP
  42. var timerVar = setInterval (function() {blockvad(); }, 300);
  43. var hits = 5
  44. function blockvad(){
  45. console.log('trying')
  46. blockgif()
  47. if(elem004){
  48. console.log('Detection!');
  49. elem004.parentElement.remove();
  50. clearInterval (timerVar);
  51. timerVar= "";
  52. }
  53. hits--
  54. console.log(hits)
  55. if(hits<=0){clearInterval (timerVar);console.log('exited');}
  56. }
  57. })();

QingJ © 2025

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