1
0
mirror of https://github.com/hacks-guide/Guide_3DS.git synced 2025-08-29 11:19:56 +02:00

add version selecting, and other minor change (#2207)

- Splits Seedminer into 2 pages, using includes. Prevents people from clicking on the twn method if they don't have a taiwanese console
- Adds a new version of Soundhax, for cart-updated consoles, more include, troubleshooting should stay

Make version selectable

This happens in order (with if/else statements):
- People select other -> redirect to checking for cfw(Checking for cfw might have to be reworded, redirecting people to NH if they boot into the HOME menu with Sys/Emu yah)
- People select 11.3 or lower -> redirect to standard Soundhax
- People select 11.4 or higher but nver < 37 and System version isnt 11.16(universal-otherapp patch lol) -> new fancy Soundhax-sp page, adds instructions on what to choose in the what you need section
- Function is called to check if cver combined with nver is sslothable... feedback appreciated on the numbers etc
- People select T as region -> redirect to seedminer(twn)
- People select C as region -> Display message pointing at ntrboot
- If none of the things apply -> redirect to Seedminer

Co-authored-by: lifehackerhansol <lifehacker@hansol.ca>
This commit is contained in:
Florian
2023-03-12 11:08:02 +01:00
committed by GitHub
parent 63b9bb3f51
commit 25a33413ce
12 changed files with 398 additions and 149 deletions

View File

@@ -305,4 +305,4 @@ $(document).ready(function() {
}
}
}
});
});

69
assets/js/selecting.js Normal file
View File

@@ -0,0 +1,69 @@
function isSSLothable(v) {
var m = v.major;
var n = v.nver;
return (
(m == 4 && n == 37) ||
(m == 5 && n == 38) ||
(m == 6 && n == 39) ||
(m == 7 && n == 40) ||
(m == 8 && n == 41) ||
(m == 9 && n == 42) ||
(m == 10 && n == 43) ||
(m == 11 && n == 43) ||
(m == 12 && n == 44) ||
(m == 13 && n == 45)
);
}
function getResultText(v) {
if (v.major == 0) {
return 1;
}
if (v.region == "C") {
return 2;
}
return undefined;
}
function getRedirect(v) {
if (v.major < 11 || v.minor < 4) {
return "installing-boot9strap-(soundhax)";
}
if (v.nver < 37 && v.minor < 16) {
return "installing-boot9strap-(soundhax-sp)";
}
if (isSSLothable(v)) {
return "installing-boot9strap-(ssloth-browser)";
}
if (v.region == "T") {
return "seedminer(twn)";
}
return "seedminer";
}
function redirect() {
var v = {
major: document.getElementById("mySelect").value,
minor: document.getElementById("mySelec").value,
nver: document.getElementById("mySel").value,
region: document.getElementById("mySe").value
};
var result = getResultText(v);
if (result !== undefined) {
document.getElementById("result_invalidVersion").style.display = "none";
document.getElementById("result_methodUnavailable").style.display = "none";
switch(result) {
case 1:
document.getElementById("result_invalidVersion").style.display = "block";
break;
case 2:
document.getElementById("result_methodUnavailable").style.display = "block";
break;
default:
break;
}
} else {
window.location.href = getRedirect(v);
}
}