Added t.co for twitter
This commit is contained in:
parent
d22aed5057
commit
d99c0c4141
|
@ -8,7 +8,8 @@ const targets = [
|
|||
/^https?:\/\/mobile\.twitter\.com/,
|
||||
/^https?:\/\/pbs\.twimg\.com/,
|
||||
/^https?:\/\/video\.twimg\.com/,
|
||||
/^https?:\/\/platform\.twitter\.com\/embed/
|
||||
/^https?:\/\/platform\.twitter\.com\/embed/,
|
||||
/^https?:\/\/t\.co/
|
||||
];
|
||||
|
||||
let redirects = {
|
||||
|
@ -151,7 +152,8 @@ function redirect(url, initiator) {
|
|||
|
||||
else if (url.pathname.split("/").includes("tweets"))
|
||||
return `${randomInstance}${url.pathname.replace("/tweets", "")}${url.search}`;
|
||||
|
||||
else if (url.host == 't.co')
|
||||
return `${randomInstance}/t.co${url.pathname}`;
|
||||
else
|
||||
return `${randomInstance}${url.pathname}${url.search}`;
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ browser.tabs.onUpdated.addListener(
|
|||
try { url = new URL(changeInfo.url); }
|
||||
catch (_) { return }
|
||||
if (youtubeHelper.isPipedorInvidious(url, 'main_frame', 'piped')) youtubeHelper.initPipedLocalStorage(tabId);
|
||||
if (twitterHelper.isNitter(url, 'main_frame')) newUrl = twitterHelper.initNitterCookies(url);
|
||||
if (twitterHelper.isNitter(url, 'main_frame')) twitterHelper.initNitterCookies(url);
|
||||
if (instagramHelper.isBibliogram(url)) instagramHelper.initBibliogramCookies(url);
|
||||
// if (changeInfo.url && youtubeHelper.isPipedorInvidious(url, 'main_frame', 'pipedMaterial')) youtubeHelper.initPipedMaterialLocalStorage(tabId);
|
||||
// if (changeInfo.url && youtubeHelper.isUrlPipedorInvidious(changeInfo.url, 'invidious')) youtubeHelper.initInvidiousCookies(tabId);
|
||||
|
|
Loading…
Reference in New Issue