Neu: DonCarne: Produkt-Klicks Fix
This commit is contained in:
14
README.md
14
README.md
@@ -154,6 +154,20 @@ Lädt ChatGPT Audio-Antworten herunter. Wenn du auf "Vorlesen" klickst, erschein
|
||||
|
||||
---
|
||||
|
||||
### 9. `doncarne-product-click-fix.user.js`
|
||||
|
||||
**Beschreibung:**
|
||||
Behebt nicht funktionierende Produkt-Klicks auf doncarne.de, wenn das Clerk.io Click-Tracking durch Adblocker blockiert wird.
|
||||
|
||||
**Funktionen:**
|
||||
- Fängt Klicks auf Produkte ab, bevor Clerk.io's Tracking-Handler sie blockiert
|
||||
- Stellt normale Browser-Navigation zu Produktseiten wieder her
|
||||
- Event-Handler in Capture-Phase läuft vor Clerk.io's Event-Handlern
|
||||
- Funktioniert automatisch auch für dynamisch geladene Produkte
|
||||
- Keine Abhängigkeit von Tracking-APIs
|
||||
|
||||
---
|
||||
|
||||
## Übersicht der enthaltenen UserStyles
|
||||
|
||||
### 1. `myanimelist-tweaks.user.css`
|
||||
|
||||
32
doncarne-product-click-fix.user.js
Normal file
32
doncarne-product-click-fix.user.js
Normal file
@@ -0,0 +1,32 @@
|
||||
// ==UserScript==
|
||||
// @name DonCarne: Produkt-Klicks Fix
|
||||
// @namespace https://git.ponywave.de/Akamaru/Userscripts
|
||||
// @version 1.0
|
||||
// @description Umgeht blockiertes Clerk.io Click-Tracking und stellt normale Navigation wieder her
|
||||
// @author Akamaru
|
||||
// @match https://doncarne.de/*
|
||||
// @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)
|
||||
|
||||
})();
|
||||
Reference in New Issue
Block a user