From 76e84c30d4a1b63d2107b9448372fc8405e9e657 Mon Sep 17 00:00:00 2001 From: ManeraKai Date: Mon, 6 Feb 2023 19:31:28 +0300 Subject: [PATCH] Added Suds: https://github.com/libredirect/libredirect/issues/595 --- src/assets/images/snopes-icon.svg | 75 ++++++++++++++++++++++++++++++ src/assets/javascripts/services.js | 7 ++- src/config.json | 19 ++++++++ 3 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 src/assets/images/snopes-icon.svg diff --git a/src/assets/images/snopes-icon.svg b/src/assets/images/snopes-icon.svg new file mode 100644 index 0000000..e668aca --- /dev/null +++ b/src/assets/images/snopes-icon.svg @@ -0,0 +1,75 @@ + + + + diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js index f3fcfa0..cdf40b6 100644 --- a/src/assets/javascripts/services.js +++ b/src/assets/javascripts/services.js @@ -450,8 +450,12 @@ function redirect(url, type, initiator, forceRedirection) { for (let i = 0; i < GETArguments.length; i++) link += (i == 0 ? "?" : "&") + GETArguments[i][0] + "=" + GETArguments[i][1] return link } - default: + case "suds": { return `${randomInstance}${url.pathname}${url.search}` + } + default: { + return `${randomInstance}${url.pathname}${url.search}` + } } } @@ -572,6 +576,7 @@ const defaultInstances = { 'anonymousOverflow': ['https://code.whatever.social'], 'biblioReads': ['https://biblioreads.ml'], 'wikiless': ['https://wikiless.org'], + 'suds': ['https://sd.vern.cc'] } function initDefaults() { diff --git a/src/config.json b/src/config.json index 066b8cc..fcd2f79 100644 --- a/src/config.json +++ b/src/config.json @@ -580,6 +580,25 @@ "imageType": "svg", "embeddable": false, "url": "https://wikipedia.org" + }, + "snopes": { + "frontends": { + "suds": { + "name": "Suds", + "instanceList": true, + "url": "https://git.vern.cc/cobra/Suds" + } + }, + "targets": [ + "^https?:\\/{2}(www\\.)?snopes\\.com\\/" + ], + "name": "Snopes", + "options": { + "enabled": false + }, + "imageType": "svg", + "embeddable": false, + "url": "https://www.snopes.com" } } }