Do not track click link

try track me click on forum.dobreprogramy.pl, remove redirect.

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

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

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         Do not track click link 
// @description  try track me click on forum.dobreprogramy.pl, remove redirect.
// @match        https://forum.dobreprogramy.pl/
// @include      https://forum.dobreprogramy.pl/*
// @icon         https://i.imgur.com/aoGUAKi.png
// @homepageURL  https://greasyfork.org/pl/scripts/37660-do-not-track-click-link
// @version      1.1.2
// @author       krystian3w
// @run-at       document-idle
// @grant        none
// @compatible   firefox Firefox
// @compatible   chrome Chrome
// @compatible   edge Edge
// @compatible   opera Opera
// @compatible   safari Safari
// @namespace https://greasyfork.org/users/167625
// ==/UserScript==

(function() {
    'use strict';

    function addNoTrackLinks() {
        document.querySelectorAll('.regular.contents .cooked a[href*="//"], .regular.contents .cooked a[href^="/uploads/"], .excerpt a[href*="//"], .excerpt a[href^="/uploads/"]').forEach(function(link) {
            link.classList.add('no-track-link');
        });
    }

    window.addEventListener("DOMContentLoaded", addNoTrackLinks);

    const observer = new MutationObserver(function(mutations) {
        mutations.forEach(function(mutation) {
            mutation.addedNodes.forEach(function(node) {
                if (node.nodeType === 1 && node.tagName === 'A') {
                    addNoTrackLinks();
                }
            });
        });
    });

    observer.observe(document.body, { childList: true, subtree: true });

    document.body.addEventListener("mouseover", function(event) {
        if (event.target.tagName === 'A') {
            addNoTrackLinks();
        }
    });
})();