From 73c510953f05f63233a7e0e1c1089f9466df4a60 Mon Sep 17 00:00:00 2001 From: MDLeom <2809763-curben@users.noreply.gitlab.com> Date: Mon, 14 Jul 2025 12:40:49 +0000 Subject: [PATCH] feat(clean_url): awstrack.me & duckduckgo --- src/clean_url.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/clean_url.js b/src/clean_url.js index e35c2752..6a0dd0e4 100644 --- a/src/clean_url.js +++ b/src/clean_url.js @@ -70,6 +70,17 @@ const deSafelink = (urlStr) => { if (paramUrl) url = new URL(paramUrl) } + // SES + // https://github.com/uBlockOrigin/uAssets/blob/42e518277ab0c36d4b131aa01b4a8828af4e18b6/filters/privacy.txt#L866 + if (url.hostname.endsWith('awstrack.me' && url.pathname.startsWith('/L0'))) { + url = new URL(decodeURIComponent(url.pathname.match(/\/L0\/(http[^\/?#]+)/)[1])) + } + + // DuckDuckGo + if (url.hostname === 'duckduckgo.com' && url.pathname === '/l/') { + url = new URL(url.searchParams.get('uddg')) + } + // "Just have to go deep enough." if (url.hostname.match(new RegExp(safeLinks.join('|')))) { return deSafelink(url.href)