this bookmarklet removes ads!

This commit is contained in:
ErmineII 2020-06-17 16:32:18 -04:00 committed by GitHub
parent bff575b534
commit b00e990a40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

1
others/ad-remove.js Normal file
View File

@ -0,0 +1 @@
javascript:var st = true; if(st){var invisible = document.createElement("style"); invisible.innerHTML = "iframe{display:none} embed{display:none} object{display:none} frame{display:none}"; document.body.appendChild(invisible); setInterval(function(){var embeds = document.querySelectorAll("iframe, embed, frame, object"); for(i = 0; i < embeds.length; i++){embeds[i].remove()}}, 500)} else{var adblock = document.createElement("style"); adblock.innerHTML = "[src=adserver] {display: none; } [src=adlinks] {display: none;} [src=adtech] {display:none;} [id=google_ads] { display: none; } [src=doubleclick.net] { display:none;} [src=googlead] { display: none; } [href=googlead] { display:none;} [src=googlesyndication] { display: none;} [src=ads.] { display: none; } [src=.ad] {display: none; } [src=ad.] {display:none;} [src=adsmart] { display:none;}"; document.body.appendChild(adblock)} if(st){var elements = document.body.querySelectorAll("*"); for(i2 = 0; i2 < elements.length; i2++){if(elements[i2].id.includes("google_ads_iframe")){elements[i2].remove()}}} var x = document.getElementsByClassName("video-stream html5-main-video")[0]; function videoblock() { if(x.src.includes("pltype=adhost")) { x.currentTime = 999999999; }} setInterval(videoblock, 10);