missav
Ekde
// ==UserScript==
// @name AV_AD_Block
// @description missav
// @icon https://static.missav.com/img/favicon.png
// @namespace loadingi.local
// @version 0.6
// @author ch
// @match https://missav.com/*
// @grant GM_setValue
// @grant GM_getValue
// @grant GM_xmlhttpRequest
// @license GPL-3.0-only
// ==/UserScript==
(function() {
'use strict';
console.log('running')
////missav.com
//Block OnceClick PopUp
var elem0 = document.querySelector("div.flex-1.order-first").children[0]
elem0.removeAttribute('x-init')
elem0.removeAttribute('x-data')
var elem1 = document.querySelector("div.relative.-mx-4.-mt-6.sm\\:m-0").children[0]
elem1.removeAttribute(elem1.attributes[0].name)
elem1.removeAttribute('@click.once')
//Block GIF AD
var elmt1 = document.querySelector('div.space-y-5.mb-5')
var elmt2 = document.querySelector('div.under_player')
var elmt3 = document.querySelector("iframe")
function blockgif(){
for (var i = 1; i<10; i++){
var obj = eval('elmt'+i)
if(obj){
console.log(obj)
obj.remove()
}else{break}
}
}
//Block Video AD
var elem004 = document.querySelector("button[class^=close-button]")
//LOOP
var timerVar = setInterval (function() {blockvad(); }, 300);
var hits = 5
function blockvad(){
console.log('trying')
blockgif()
if(elem004){
console.log('Detection!');
elem004.parentElement.remove();
clearInterval (timerVar);
timerVar= "";
}
hits--
console.log(hits)
if(hits<=0){clearInterval (timerVar);console.log('exited');}
}
})();