about summary refs log tree commit diff stats
path: root/src/assets/javascripts/services.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/assets/javascripts/services.js')
-rw-r--r--src/assets/javascripts/services.js17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js
index 22b73f57..412c044a 100644
--- a/src/assets/javascripts/services.js
+++ b/src/assets/javascripts/services.js
@@ -554,9 +554,6 @@ function redirect(url, type, initiator, forceRedirection) {
 			if (path == "/") path = ""
 			return `${randomInstance}/${url.hostname}${path}${url.search}`
 		}
-		default: {
-			return `${randomInstance}${url.pathname}${url.search}`
-		}
 		case "quetre": {
 			const regex = /([a-z]+)\.quora\.com/.exec(url.hostname)
 			console.log(regex)
@@ -567,6 +564,17 @@ function redirect(url, type, initiator, forceRedirection) {
 			}
 			return `${randomInstance}${url.pathname}${url.search}`
 		}
+		case "pixivFe": {
+			const regex = /\/[a-z]{1,3}\/(.*)/.exec(url.pathname)
+			if (regex) {
+				const path = regex[1]
+				return `${randomInstance}/${path}${url.search}`
+			}
+			return `${randomInstance}${url.pathname}${url.search}`
+		}
+		default: {
+			return `${randomInstance}${url.pathname}${url.search}`
+		}
 	}
 }
 
@@ -711,7 +719,8 @@ const defaultInstances = {
 	"laboratory": ['https://lab.vern.cc'],
 	"libreSpeed": ['https://librespeed.org'],
 	'jitsi': ['https://meet.jit.si', 'https://8x8.vc'],
-	'binternet': ['https://binternet.ahwx.org']
+	'binternet': ['https://binternet.ahwx.org'],
+	'pixivFe': ['https://pixivfe.exozy.me']
 }
 
 function initDefaults() {