aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2023-05-30 13:22:40 +0300
committerManeraKai <manerakai@protonmail.com>2023-05-30 13:22:40 +0300
commita45e9ed228fab8b23d65a48263391ffe7ec6ff6e (patch)
tree4d22cfe701d13b7480fd57dd4653efb37a54fbf9
parentRenamed Unsupported paths handling => Unsupported iframes handling https://gi... (diff)
downloadlibredirect-a45e9ed228fab8b23d65a48263391ffe7ec6ff6e.zip
Added Intellectual https://github.com/libredirect/browser_extension/issues/699
-rw-r--r--src/assets/javascripts/services.js8
-rw-r--r--src/config.json6
2 files changed, 14 insertions, 0 deletions
diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js
index 65695de8..c3f6a4e2 100644
--- a/src/assets/javascripts/services.js
+++ b/src/assets/javascripts/services.js
@@ -433,6 +433,13 @@ function redirect(url, type, initiator, forceRedirection) {
if (url.pathname.endsWith('-lyrics')) {
return `${randomInstance}${url.pathname}`
}
+ return `${randomInstance}${url.pathname}${url.search}`
+ }
+ case "intellectual": {
+ if (url.pathname.endsWith('-lyrics')) {
+ return `${randomInstance}/lyrics?path=${encodeURIComponent(url.pathname)}`
+ }
+ return `${randomInstance}${url.pathname}${url.search}`
}
case "ruralDictionary": {
if (!url.pathname.includes('/define.php') && !url.pathname.includes('/random.php') && url.pathname != '/') return randomInstance
@@ -664,6 +671,7 @@ const defaultInstances = {
'breezeWiki': ['https://breezewiki.com'],
'neuters': ['https://neuters.de'],
'dumb': ['https://dm.vern.cc'],
+ "intellectual": ['https://intellectual.insprill.net'],
'ruralDictionary': ['https://rd.vern.cc'],
'anonymousOverflow': ['https://code.whatever.social'],
'biblioReads': ['https://biblioreads.ml'],
diff --git a/src/config.json b/src/config.json
index cd5dc5f0..279b756d 100644
--- a/src/config.json
+++ b/src/config.json
@@ -567,6 +567,12 @@
"instanceList": true,
"url": "https://github.com/rramiachraf/dumb",
"localhost": true
+ },
+ "intellectual": {
+ "name": "Intellectual",
+ "instanceList": true,
+ "url": "https://github.com/Insprill/intellectual",
+ "localhost": false
}
},
"targets": [