1
0
Files
Userscripts/doncarne-product-click-fix.user.js
2025-11-11 00:58:22 +01:00

34 lines
1.4 KiB
JavaScript

// ==UserScript==
// @name DonCarne: Produkt-Klicks Fix
// @namespace https://git.ponywave.de/Akamaru/Userscripts
// @version 1.1
// @description Umgeht blockiertes Clerk.io Click-Tracking und stellt normale Navigation wieder her
// @author Akamaru
// @match https://doncarne.de/*
// @icon https://www.google.com/s2/favicons?domain=doncarne.de&sz=32
// @grant none
// @updateURL https://git.ponywave.de/Akamaru/Userscripts/raw/branch/master/doncarne-product-click-fix.user.js
// @downloadURL https://git.ponywave.de/Akamaru/Userscripts/raw/branch/master/doncarne-product-click-fix.user.js
// ==/UserScript==
(function() {
'use strict';
// Event-Handler in Capture-Phase - läuft VOR Clerk.io's Event-Handlern
document.addEventListener('click', function(event) {
// Finde das geklickte Element oder einen Parent-Link
let target = event.target.closest('a[data-clerk-click-tracking-added="true"]');
if (target && target.href) {
// Stoppe alle Event-Propagation und Default-Verhalten
event.preventDefault();
event.stopPropagation();
event.stopImmediatePropagation();
// Navigiere direkt zur URL, ohne auf Clerk.io Tracking zu warten
window.location.href = target.href;
}
}, true); // true = Capture-Phase (vor Bubbling-Phase, wo Clerk.io's Handler läuft)
})();