From fa3ad783920af186a44de3920a0609ee541e23df Mon Sep 17 00:00:00 2001 From: ManeraKai Date: Thu, 2 Feb 2023 19:50:22 +0300 Subject: Fixed not redirecting to Desktop apps https://codeberg.org/LibRedirect/libredirect/issues/72 --- src/assets/javascripts/services.js | 2 +- src/config.json | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js index fc610afb..971fb615 100644 --- a/src/assets/javascripts/services.js +++ b/src/assets/javascripts/services.js @@ -63,13 +63,13 @@ function redirect(url, type, initiator, forceRedirection) { ) return "BYPASSTAB" let instanceList = options[frontend] + if (instanceList === undefined) break if (instanceList.length === 0) return randomInstance = utils.getRandomInstance(instanceList) break } - if (!randomInstance) return // Here is a (temperory) space for defining constants required in 2 or more switch cases. const mapCentreRegex = /@(-?\d[0-9.]*),(-?\d[0-9.]*),(\d{1,2})[.z]/ diff --git a/src/config.json b/src/config.json index 07d10f4b..8e3d2711 100644 --- a/src/config.json +++ b/src/config.json @@ -497,6 +497,25 @@ "imageType": "svg", "embeddable": false, "url": "https://genius.com" + }, + "urbanDictionary": { + "frontends": { + "ruralDictionary": { + "name": "Rural Dictionary", + "instanceList": true, + "url": "https://codeberg.org/zortazert/rural-dictionary" + } + }, + "targets": [ + "^https?:\\/{2}(www\\.)?urbandictionary.com\\/" + ], + "name": "Urban Dictionary", + "options": { + "enabled": false + }, + "imageType": "svg", + "embeddable": false, + "url": "https://genius.com" } } } \ No newline at end of file -- cgit 1.4.1