mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-02 21:12:02 +08:00
Added: replace Mandrill (Mailchimp) tracking links with normal links
This commit is contained in:
parent
69ae65b4bb
commit
55bf83e02a
1 changed files with 10 additions and 0 deletions
|
@ -22,6 +22,16 @@ const
|
|||
.replace(/^.+awstrack\.me\/.+(https:%2F%2F[^/]+)/gsi, (...m) => decodeURIComponent(m[1]))
|
||||
.replace(/([?&])utm_[a-z]+=[^&?#]*/gsi, '$1') // Urchin Tracking Module
|
||||
.replace(/([?&])ec_[a-z]+=[^&?#]*/gsi, '$1') // Sitecore
|
||||
.replace(/^.+mandrillapp.com.+\?p=([a-z0-9]+)/gsi, (...m) => {
|
||||
let d = JSON.parse(atob(m[1]));
|
||||
if (d && d.p) {
|
||||
d = JSON.parse(d.p);
|
||||
if (d && d.url) {
|
||||
return d.url;
|
||||
}
|
||||
}
|
||||
return m[0];
|
||||
})
|
||||
.replace(/&&+/, '');
|
||||
|
||||
export const
|
||||
|
|
Loading…
Reference in a new issue