mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +03:00
Strip awstrack.me tracking
This commit is contained in:
parent
873c9ebd8c
commit
ff394356b6
1 changed files with 5 additions and 2 deletions
|
|
@ -15,8 +15,11 @@ const
|
|||
|
||||
replaceWithChildren = node => node.replaceWith(...[...node.childNodes]),
|
||||
|
||||
// Strip utm_* tracking
|
||||
stripTracking = text => text.replace(/([?&])utm_[a-z]+=[^&?#]*/gsi, '$1').replace(/&&+/, '');
|
||||
// Strip tracking
|
||||
stripTracking = text => text
|
||||
.replace(/^.+awstrack\.me\/.+(https:%2F%2F[^/]+)/gsi, (...m) => decodeURIComponent(m[1]))
|
||||
.replace(/([?&])utm_[a-z]+=[^&?#]*/gsi, '$1')
|
||||
.replace(/&&+/, '');
|
||||
|
||||
export const
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue