about summary refs log tree commit diff stats
path: root/src/assets/javascripts
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2023-02-02 23:29:40 +0300
committerManeraKai <manerakai@protonmail.com>2023-02-02 23:29:52 +0300
commitce742b28a077c9626f1f7fe4101a5b770c5b56c8 (patch)
tree003141cf6b2a944053f4c17b5e1868ef1e6d4460 /src/assets/javascripts
parentMerge https://codeberg.org/gospodin/libredirect (diff)
downloadlibredirect-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.js5
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()