From 64b765d775b0adadc1ac20db54cc9501503d9200 Mon Sep 17 00:00:00 2001 From: ManeraKai Date: Fri, 9 Aug 2024 22:24:03 +0300 Subject: [PATCH] Added Eddrit https://github.com/libredirect/browser_extension/issues/938 --- src/assets/javascripts/services.js | 4 ++++ src/config.json | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js index 5c26325..8dee83d 100644 --- a/src/assets/javascripts/services.js +++ b/src/assets/javascripts/services.js @@ -273,6 +273,9 @@ function rewrite(url, frontend, randomInstance) { else return `${randomInstance}${url.pathname}${url.search}&teddit_proxy=${url.hostname}` } return `${randomInstance}${url.pathname}${url.search}` + case "eddrit": + if (/^(?:(?:external-)?preview|i)\.redd\.it/.test(url.hostname)) return randomInstance + return `${randomInstance}${url.pathname}${url.search}` case "neuters": { const p = url.pathname if (p.startsWith("/article/") || p.startsWith("/pf/") || p.startsWith("/arc/") || p.startsWith("/resizer/")) { @@ -746,6 +749,7 @@ const defaultInstances = { redlib: ["https://safereddit.com"], libreddit: ["https://libreddit.spike.codes"], teddit: ["https://teddit.net"], + eddrit: ["https://eddrit.com"], scribe: ["https://scribe.rip"], libMedium: ["https://md.vern.cc"], quetre: ["https://quetre.iket.me"], diff --git a/src/config.json b/src/config.json index 5ce6031..350559b 100644 --- a/src/config.json +++ b/src/config.json @@ -214,13 +214,19 @@ "name": "Redlib", "instanceList": true, "url": "https://github.com/redlib-org/redlib", - "localhost": true + "localhost": false }, "teddit": { "name": "Teddit", "instanceList": true, "url": "https://codeberg.org/teddit/teddit", - "localhost": true + "localhost": false + }, + "eddrit": { + "name": "Eddrit", + "instanceList": true, + "url": "https://github.com/corenting/eddrit", + "localhost": false } }, "targets": [