From ce742b28a077c9626f1f7fe4101a5b770c5b56c8 Mon Sep 17 00:00:00 2001 From: ManeraKai Date: Thu, 2 Feb 2023 23:29:40 +0300 Subject: Adde Rural Dictionary https://github.com/libredirect/libredirect/issues/581 --- src/assets/images/urbanDictionary-icon.svg | 49 ++++++++++++++++++++++++++++++ src/assets/javascripts/services.js | 5 +++ 2 files changed, 54 insertions(+) create mode 100644 src/assets/images/urbanDictionary-icon.svg (limited to 'src/assets') diff --git a/src/assets/images/urbanDictionary-icon.svg b/src/assets/images/urbanDictionary-icon.svg new file mode 100644 index 00000000..2172e286 --- /dev/null +++ b/src/assets/images/urbanDictionary-icon.svg @@ -0,0 +1,49 @@ + + + + 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() -- cgit 1.4.1