diff options
author | ManeraKai <manerakai@protonmail.com> | 2023-02-02 19:50:22 +0300 |
---|---|---|
committer | ManeraKai <manerakai@protonmail.com> | 2023-02-02 19:50:22 +0300 |
commit | fa3ad783920af186a44de3920a0609ee541e23df (patch) | |
tree | 5a4faeb374bb855ecd4de0f73182afa4276db722 /src | |
parent | Merge pull request #610 from dvikan/fix-1 (diff) | |
download | libredirect-fa3ad783920af186a44de3920a0609ee541e23df.zip |
Fixed not redirecting to Desktop apps https://codeberg.org/LibRedirect/libredirect/issues/72
Diffstat (limited to 'src')
-rw-r--r-- | src/assets/javascripts/services.js | 2 | ||||
-rw-r--r-- | src/config.json | 19 |
2 files changed, 20 insertions, 1 deletions
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 |