client: update URL tracking removal

This commit is contained in:
Johann150 2024-02-23 12:32:15 +01:00
parent dbdb2b70f1
commit 76aef3de74
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -15,11 +15,13 @@ export function removeTracking(url: string): string {
parsed.searchParams.delete('si'); // source identifier
} else if (['heise.de', 'www.heise.de'].includes(parsed.host)) {
parsed.searchParams.delete('wt_mc');
} else if (['derstandard.at', 'www.derstandard.at'].includes(parsed.host)) {
parsed.searchParams.delete('ref');
} else if (['tagesschau.de'].includes(parsed.host)) {
parsed.searchParams.delete('at_medium');
parsed.searchParams.delete('at_campaign');
} else if (!isMobile && /\.m\.wikipedia\.org$/i.test(parsed.host)) {
parsed.host = parsed.host.replace('.m.', '.');
} else {
parsed.searchParams.delete('ref');
parsed.searchParams.delete('utm_source');
parsed.searchParams.delete('utm_medium');
parsed.searchParams.delete('utm_campaign');