1
0
mirror of https://github.com/hacks-guide/Guide_3DS.git synced 2025-08-18 14:31:30 +02:00

automatically replace link to file accordingly to selected version

This commit is contained in:
DannyAAM
2024-10-04 23:58:39 +08:00
committed by lifehackerhansol
parent 18c99906c7
commit c791cbaffe
18 changed files with 284 additions and 52 deletions

View File

@@ -0,0 +1,43 @@
/*
Copyright (C) 2024 DannyAAM
SPDX-License-Identifier: MIT
*/
(() => {
const BASE = "https://hacksguidewiki.sfo3.digitaloceanspaces.com/hacksguidewiki/Super-skaterhax";
window.MATCH = "skater.nintendohomebrew.com";
window.generateLink = (major, minor, nver, region, model, link) => {
const fileRegion = FILENAME_REGION_MAP[region];
if (model != DEVICE_N3DS || major < 11) {
return null;
}
let fileVersion;
switch (region) {
case "U":
if (minor == 17) {
fileVersion = "v11.17";
} else {
fileVersion = "pre17";
}
break;
case "K":
if (minor == 17) {
return null;
} else {
fileVersion = "pre17";
}
break;
default:
fileVersion = "all";
break;
}
return `${BASE}-${fileRegion}-${fileVersion}.zip`;
}
})();