diff options
author | SimonBrazell <simon@brazell.com.au> | 2020-05-20 09:10:38 +1000 |
---|---|---|
committer | SimonBrazell <simon@brazell.com.au> | 2020-05-20 09:10:38 +1000 |
commit | 50477da8d73997c012f5466212d2264c68ee5a26 (patch) | |
tree | 33bc5f1e04d3b87b18d6729910a600c7025f79ff /background.js | |
parent | Tweak light & dark mode colours (diff) | |
download | libredirect-50477da8d73997c012f5466212d2264c68ee5a26.zip |
Fixes #51 & fixes #52 - `/tweets` redirects & popup styling
Diffstat (limited to 'background.js')
-rw-r--r-- | background.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/background.js b/background.js index d90f55c6..5c847024 100644 --- a/background.js +++ b/background.js @@ -232,6 +232,8 @@ function redirectTwitter(url, initiator) { return `${nitterInstance}/pic/${encodeURIComponent(url.href)}`; } else if (url.host.split('.')[0] === 'video') { return `${nitterInstance}/gif/${encodeURIComponent(url.href)}`; + } else if (url.pathname.includes('tweets')) { + return `${nitterInstance}${url.pathname.replace('/tweets', '')}${url.search}`; } else { return `${nitterInstance}${url.pathname}${url.search}`; } |