about summary refs log tree commit diff stats
path: root/background.js
diff options
context:
space:
mode:
authorSimonBrazell <simon@brazell.com.au>2020-05-20 09:10:38 +1000
committerSimonBrazell <simon@brazell.com.au>2020-05-20 09:10:38 +1000
commit50477da8d73997c012f5466212d2264c68ee5a26 (patch)
tree33bc5f1e04d3b87b18d6729910a600c7025f79ff /background.js
parentTweak light & dark mode colours (diff)
downloadlibredirect-50477da8d73997c012f5466212d2264c68ee5a26.zip
Fixes #51 & fixes #52 - `/tweets` redirects & popup styling
Diffstat (limited to 'background.js')
-rw-r--r--background.js2
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}`;
   }