Redirect Twitter "video" subdomain & update dev dependencies.

This commit is contained in:
SimonBrazell 2021-06-16 22:22:53 +10:00
parent 32dc9b1601
commit 061dfc0904
4 changed files with 209 additions and 585 deletions

View File

@ -12,6 +12,7 @@
[![Donate](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.com/SimonBrazell/donate) [![Buy me a coffee](src/assets/images/buy-me-a-coffee.png)](https://www.buymeacoffee.com/SimonBrazell)
- **FIRO** `aEyKPU7mwWBYRFGoLiUGeQQybyzD8jzsS8`
- **BTC:** `3JZWooswwmmqQKw5iW6AYFfK5gcWTrvueE`
- **ETH:** `0x90049dc59365dF683451319Aa4632aC61193dFA7`

785
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -20,6 +20,6 @@
},
"homepage": "https://github.com/SimonBrazell/privacy-redirect#readme",
"devDependencies": {
"web-ext": "^6.0.0"
"web-ext": "^6.1.0"
}
}

View File

@ -305,14 +305,10 @@ function redirectTwitter(url, initiator) {
});
return null;
}
if (url.host.split(".")[0] === "pbs") {
if (url.host.split(".")[0] === "pbs" || url.host.split(".")[0] === "video") {
return `${
nitterInstance || commonHelper.getRandomInstance(nitterRandomPool)
}/pic/${encodeURIComponent(url.href)}`;
} else if (url.host.split(".")[0] === "video") {
return `${
nitterInstance || commonHelper.getRandomInstance(nitterRandomPool)
}/gif/${encodeURIComponent(url.href)}`;
} else if (url.pathname.split("/").includes("tweets")) {
return `${
nitterInstance || commonHelper.getRandomInstance(nitterRandomPool)