Do not track click link

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

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

Bạn sẽ cần cài đặt một tiện ích mở rộng như Tampermonkey hoặc Violentmonkey để cài đặt kịch bản này.

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

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

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

You will need to install a user script manager extension to install this script.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==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();
        }
    });
})();