Greasy Fork

derstandard.at adfree Rework April 2024

Zeigt normale Bilder bei Artikel an und keine Benachrichtung mehr, dass Werbung geblockt wird.

目前为 2024-04-24 提交的版本。查看 最新版本

// ==UserScript==
// @name         derstandard.at adfree Rework April 2024
// @namespace    derstandard
// @version      2024-04-26
// @description  Zeigt normale Bilder bei Artikel an und keine Benachrichtung mehr, dass Werbung geblockt wird.
// @author       You
// @match        https://www.derstandard.at/
// @icon         https://www.google.com/s2/favicons?sz=64&domain=derstandard.at
// @grant        GM_addStyle
// @unwrap
// ==/UserScript==
/*- The @grant directive is needed to work around a major design
    change introduced in GM 1.0. It restores the sandbox.

    If in Tampermonkey, use "// @unwrap" to enable sandbox instead.
*/

console.log('Tampermonkey derstandard.at starting');

(new MutationObserver(check)).observe(document, {childList: true, subtree: true});

function check(changes, observer) {
    if(document.querySelector("[data-ad-active='true']")) {
        console.log("QuerySelecter executed and found: [data-ad-active='true']");
        //observer.disconnect();
        // actions to perform after #mySelector is found
        document.querySelectorAll("[data-ad-active='true']").forEach(function(elem) {
            console.log('Removing element: ', elem);
            elem.remove();
        })
    }
}


document.cookie = 'MGUID=dup;domain=.derstandard.at;Path=/';
document.cookie = 'quiz_tracker=dup';
document.cookie = 'ASP.NET_SessionId=dup';
document.cookie = 'invitationCookie=dup';
document.cookie = 'TrackingCookie=dup;domain=.derstandard.at;Path=/';
document.cookie = 'TrackingCookieSession=dup;domain=.derstandard.at;Path=/';