Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

blocking youtube adds in php

(function removeAdvertisementAndBlockingElements () {
    $('.inRek').remove();
    $('.mgbox').remove();
    
    Array.from(document.getElementsByTagName("img")).forEach(function (e) {
        if (!e.src.includes(window.location.host)) {
            e.remove()
        }
    });    
    
    Array.from(document.getElementsByTagName("div")).forEach(function (e) {
        var currentZIndex = parseInt(document.defaultView.getComputedStyle(e, null).zIndex);
        if (currentZIndex > 999) {
            console.log(parseInt(currentZIndex));
            e.remove()
        }
    });
})();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #blocking #youtube #adds #php
ADD COMMENT
Topic
Name
8+5 =