From a6098e6ec27c2c17aab17d3f63b702d71c9fda3d Mon Sep 17 00:00:00 2001 From: ManeraKai Date: Wed, 18 Jan 2023 18:17:43 +0300 Subject: [PATCH] Removed Bibliogram https://github.com/libredirect/libredirect/issues/573 --- README.md | 3 +-- package.json | 10 +--------- src/assets/javascripts/general.js | 2 +- src/assets/javascripts/services.js | 7 ------- src/config.json | 19 ------------------- 5 files changed, 3 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 82e4784..d124296 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -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 [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 [Beatbump](https://github.com/snuffyDev/Beatbump), [Hyperpipe](https://codeberg.org/Hyperpipe/Hyperpipe) - Twitter [Nitter](https://github.com/zedeus/nitter) -- Instagram [Bibliogram](https://sr.ht/~cadence/bibliogram/) - TikTok [ProxiTok](https://github.com/pablouser1/ProxiTok) - Reddit [Libreddit](https://github.com/spikecodes/libreddit#instances), [Teddit](https://codeberg.org/teddit/teddit#instances) - Imgur [Rimgo](https://codeberg.org/video-prize-ranch/rimgo) diff --git a/package.json b/package.json index d8d2677..b27cba7 100644 --- a/package.json +++ b/package.json @@ -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 diff --git a/src/assets/javascripts/general.js b/src/assets/javascripts/general.js index 7fc9d1b..b2ad7c2 100644 --- a/src/assets/javascripts/general.js +++ b/src/assets/javascripts/general.js @@ -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() diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js index 4b8f918..159e39e 100644 --- a/src/assets/javascripts/services.js +++ b/src/assets/javascripts/services.js @@ -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": diff --git a/src/config.json b/src/config.json index ca279a8..1ccbf9a 100644 --- a/src/config.json +++ b/src/config.json @@ -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": {