Flickr Pro Nag Remover

Removes the obnoxious "Upgrade to Flickr Pro to hide these ads" nag screen (that normally appears every 6 image slides) by deleting the 'adCounter' cookie that tracks your slideshow clicks.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Flickr Pro Nag Remover
// @namespace    https://greatest.deepsurf.us/en/users/1148791-vuccala
// @version      1.0
// @description  Removes the obnoxious "Upgrade to Flickr Pro to hide these ads" nag screen (that normally appears every 6 image slides) by deleting the 'adCounter' cookie that tracks your slideshow clicks.
// @author       Vuccala
// @icon         https://archive.org/download/no-nag-flickr-icon/flic.png
// @match        *://*.flickr.com/*
// @grant        none
// @run-at       document-start
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Function to delete a cookie by name
    function deleteCookie(name) {
        document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; domain=.flickr.com;';
    }

    // Function to check and delete the "adCounter" cookie
    function checkAndDeleteCookie() {
        if (document.cookie.includes("adCounter")) {
            deleteCookie("adCounter");
            console.log("Deleted adCounter cookie.");
        }
    }

    // Observe changes in the document
    const observer = new MutationObserver(() => {
        checkAndDeleteCookie();
    });

    // Observe the entire document and subtree changes
    observer.observe(document, { childList: true, subtree: true });

    // Initial check for the cookie
    checkAndDeleteCookie();
})();