diff options
author | ManeraKai <manerakai@protonmail.com> | 2023-02-02 23:29:40 +0300 |
---|---|---|
committer | ManeraKai <manerakai@protonmail.com> | 2023-02-02 23:29:52 +0300 |
commit | ce742b28a077c9626f1f7fe4101a5b770c5b56c8 (patch) | |
tree | 003141cf6b2a944053f4c17b5e1868ef1e6d4460 /src/assets/javascripts | |
parent | Merge https://codeberg.org/gospodin/libredirect (diff) | |
download | libredirect-ce742b28a077c9626f1f7fe4101a5b770c5b56c8.zip |
Adde Rural Dictionary https://github.com/libredirect/libredirect/issues/581
Diffstat (limited to 'src/assets/javascripts')
-rw-r--r-- | src/assets/javascripts/services.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js index 971fb615..7a9f3d91 100644 --- a/src/assets/javascripts/services.js +++ b/src/assets/javascripts/services.js @@ -394,6 +394,10 @@ function redirect(url, type, initiator, forceRedirection) { case "dumb": { if (url.pathname.endsWith('-lyrics')) return `${randomInstance}${url.pathname}` } + case "ruralDictionary": { + if (!url.pathname.endsWith('/define.php') && !url.pathname.endsWith('/random.php') && !url.pathname.endsWith('/')) return + return `${randomInstance}${url.pathname}${url.search}` + } } } @@ -532,6 +536,7 @@ function initDefaults() { options['breezeWiki'] = ['https://breezewiki.com'] options['neuters'] = ['https://neuters.de'] options['dumb'] = ['https://dm.vern.cc'] + options['ruralDictionary'] = ['https://rd.vern.cc'] browser.storage.local.set({ options }, () => resolve() |