This commit is contained in:
ManeraKai 2023-01-18 18:17:43 +03:00
parent 29201bb7b1
commit a6098e6ec2
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
5 changed files with 3 additions and 38 deletions

View File

@ -1,6 +1,6 @@
<img src="./img/libredirect_full.svg" height="50"/>
A web extension that redirects YouTube, Twitter, Instagram... requests to alternative privacy friendly frontends and backends.
A web extension that redirects YouTube, Twitter, TikTok... requests to alternative privacy friendly frontends and backends.
[![Matrix Badge](https://img.shields.io/matrix/libredirect:matrix.org?label=matrix%20chat)](https://matrix.to/#/#libredirect:matrix.org)
[![Firefox users Badge](https://img.shields.io/amo/users/libredirect?label=Firefox%20users)](https://addons.mozilla.org/firefox/addon/libredirect/)
@ -21,7 +21,6 @@ A web extension that redirects YouTube, Twitter, Instagram... requests to altern
- Youtube <span>&#8594;</span> [Invidious](https://github.com/iv-org/invidious), [Piped](https://github.com/TeamPiped/Piped), [Piped-Material](https://github.com/mmjee/Piped-Material), [CloudTube](https://sr.ht/~cadence/tube/), [FreeTube](https://github.com/FreeTubeApp/FreeTube), [Yattee](https://github.com/yattee/yattee)
- Youtube Music <span>&#8594;</span> [Beatbump](https://github.com/snuffyDev/Beatbump), [Hyperpipe](https://codeberg.org/Hyperpipe/Hyperpipe)
- Twitter <span>&#8594;</span> [Nitter](https://github.com/zedeus/nitter)
- Instagram <span>&#8594;</span> [Bibliogram](https://sr.ht/~cadence/bibliogram/)
- TikTok <span>&#8594;</span> [ProxiTok](https://github.com/pablouser1/ProxiTok)
- Reddit <span>&#8594;</span> [Libreddit](https://github.com/spikecodes/libreddit#instances), [Teddit](https://codeberg.org/teddit/teddit#instances)
- Imgur <span>&#8594;</span> [Rimgo](https://codeberg.org/video-prize-ranch/rimgo)

View File

@ -1,6 +1,6 @@
{
"name": "libredirect",
"description": "Redirects YouTube, Twitter, Instagram and more to privacy friendly frontends.",
"description": "Redirects YouTube, Twitter, TikTok and more to privacy friendly frontends.",
"engines": {
"node": ">=16.13.1",
"npm": ">=8.1.2"
@ -26,14 +26,6 @@
"web-ext": "^7.2.0"
},
"webExt": {
"ignoreFiles": [
"instances/get_instances.py",
"instances/beatbump.json",
"instances/bibliogram.json",
"instances/cloudtube.json",
"instances/facil.json",
"instances/neuters.json"
],
"sourceDir": "./src/",
"run": {
"browserConsole": true

View File

@ -31,7 +31,7 @@ async function initDefaults() {
regex: [],
},
theme: "detect",
popupServices: ["youtube", "twitter", "instagram", "tiktok", "imgur", "reddit", "quora", "translate", "maps"],
popupServices: ["youtube", "twitter", "tiktok", "imgur", "reddit", "quora", "translate", "maps"],
},
},
() => resolve()

View File

@ -101,12 +101,6 @@ function redirect(url, type, initiator, forceRedirection, tabId) {
.replace(/\/search\?q=.*/, searchQuery => searchQuery.replace("?q=", "/") + "?filter=all")
case "hyperpipe":
return `${randomInstance}${url.pathname}${url.search}`.replace(/\/search\?q=.*/, searchQuery => searchQuery.replace("?q=", "/"))
case "bibliogram":
const reservedPaths = ["u", "p", "privacy"]
if (url.pathname === "/" || reservedPaths.includes(url.pathname.split("/")[1])) return `${randomInstance}${url.pathname}${url.search}`
if (url.pathname.startsWith("/reel")) return `${randomInstance}${url.pathname}`
if (url.pathname.startsWith("/tv")) return `${randomInstance}/p${url.pathname.replace(/\/tv/i, "")}${url.search}`
else return `${randomInstance}/u${url.pathname}${url.search}` // Likely a user profile, redirect to '/u/...'
case "lbryDesktop":
return url.href.replace(/^https?:\/{2}odysee\.com\//, "lbry://").replace(/:(?=[a-zA-Z0-9])/g, "#")
case "searx":
@ -477,7 +471,6 @@ function reverse(url, urlString) {
if (!all(service, null, options, config).includes(protocolHost)) continue
switch (service) {
case "instagram":
case "youtube":
case "imdb":
case "imgur":

View File

@ -141,25 +141,6 @@
"embeddable": true,
"url": "https://twitter.com"
},
"instagram": {
"frontends": {
"bibliogram": {
"name": "Bibliogram",
"instanceList": true,
"url": "https://sr.ht/~cadence/bibliogram/"
}
},
"targets": [
"^https?:\\/{2}(www\\.)?instagram\\.com\\/?(p\\/|reel\\/|$)"
],
"name": "Instagram",
"options": {
"enabled": true
},
"imageType": "png",
"embeddable": false,
"url": "https://instagram.com"
},
"tiktok": {
"frontends": {
"proxiTok": {