Greasy Fork is available in English.

news247.gr Anti-AntiAdblock

Disables anti-adblock in news247.gr

// ==UserScript==
// @name         news247.gr Anti-AntiAdblock
// @description  Disables anti-adblock in news247.gr
// @version      1.1
// @include      http*://www.news247.gr/*
// @namespace    https://greasyfork.org/users/674500
// ==/UserScript==

function waitForEl(selector) {
    return new Promise(resolve => {
        if(document.querySelector(selector)) {
            return resolve(document.querySelector(selector));
        }
        const observer = new MutationObserver(mutations => {
            if(document.querySelector(selector)) {
                resolve(document.querySelector(selector));
                observer.disconnect();
            }
        });
        observer.observe(document.body, {
            childList: true,
            subtree: true
        });
    });
}

waitForEl('div.fc-ab-root').then((elm) => {
    document.body.removeAttribute('style');
    var el = document.getElementsByClassName('fc-ab-root');
    while(el.length > 0) el[0].remove();
});