Skip to content

Commit 756c0ac

Browse files
committed
Added Wikimore #1025
1 parent f2f4e67 commit 756c0ac

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/assets/javascripts/services.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,15 @@ function rewrite(url, originUrl, frontend, randomInstance, type) {
287287
}
288288
case "biblioReads":
289289
return `${randomInstance}${url.pathname}${url.search}`
290+
case "wikimore": {
291+
let hostSplit = url.host.split(".")
292+
// wikiless doesn't have mobile view support yet
293+
if (hostSplit[0] != "wikipedia" && hostSplit[0] != "www") {
294+
const lang = url.hostname.split(".")[0]
295+
return `${randomInstance}/wiki/${lang}${url.pathname}${url.search}${url.hash}`
296+
}
297+
return `${randomInstance}${url.pathname}${url.search}${url.hash}`
298+
}
290299
case "wikiless": {
291300
let hostSplit = url.host.split(".")
292301
// wikiless doesn't have mobile view support yet
@@ -910,6 +919,7 @@ const defaultInstances = {
910919
koub: ["https://koub.clovius.club"],
911920
soundcloak: ["https://soundcloak.fly.dev"],
912921
gocook: ["https://cook.adminforge.de"],
922+
wikimore: ["https://wikimore.private.coffee"],
913923
}
914924

915925
async function getDefaults() {

src/config.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,6 +1012,11 @@
10121012
"name": "Wikiless",
10131013
"instanceList": true,
10141014
"url": "https://wikiless.org"
1015+
},
1016+
"wikimore": {
1017+
"name": "Wikimore",
1018+
"instanceList": true,
1019+
"url": "https://git.private.coffee/privatecoffee/wikimore"
10151020
}
10161021
},
10171022
"targets": [

0 commit comments

Comments
 (0)