about summary refs log tree commit diff stats
path: root/src/assets/javascripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/assets/javascripts')
-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 80c927cf..e8315ff5 100644
--- a/src/assets/javascripts/services.js
+++ b/src/assets/javascripts/services.js
@@ -489,9 +489,6 @@ function redirect(url, type, initiator, forceRedirection) {
 			}
 			return `${randomInstance}`
 		}
-		default: {
-			return `${randomInstance}${url.pathname}${url.search}`
-		}
 		case "gothub": {
 			const regex = /^\/(.*)\/(.*)\/(?:blob|tree)\/(.*)\/(.*)/.exec(url.pathname)
 			if (regex) {
@@ -503,6 +500,17 @@ function redirect(url, type, initiator, forceRedirection) {
 			}
 			return `${randomInstance}${url.pathname}${url.search}`
 		}
+		case "mikuIndividious": {
+			if (url.hostname == "bilibili.com" || url.hostname == "www.bilibili.com" || url.hostname == 'b23.tv') {
+				return `${randomInstance}${url.pathname}${url.search}`
+			}
+			if (url.hostname == "space.bilibili.com") {
+				return `${randomInstance}/space${url.pathname}${url.search}`
+			}
+		}
+		default: {
+			return `${randomInstance}${url.pathname}${url.search}`
+		}
 	}
 }
 
@@ -629,7 +637,8 @@ const defaultInstances = {
 	'wikiless': ['https://wikiless.org'],
 	'suds': ['https://sd.vern.cc'],
 	'waybackClassic': ['https://wayback-classic.net'],
-	'gothub': ['https://gh.odyssey346.dev']
+	'gothub': ['https://gh.odyssey346.dev'],
+	'mikuIndividious': ['https://mikuinv.resrv.org'],
 }
 
 function initDefaults() {