Skip to content

Commit c041088

Browse files
ManiacOfGitHublifehackerhansol
authored andcommitted
consoleVersionSelect: add version prefix
If they don't select "Ver.", they have Luma3DS and have skipped the CFW check.
1 parent ac9019e commit c041088

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

docs/_internal/consoleVersionSelect.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@
1010
</table>
1111
<div id="selectversion" class="selectversion">
1212
<br>
13-
<select id="major">
13+
<select id="prefix">
14+
<option />
15+
<option>Ver.</option>
16+
<option>Sys.</option>
17+
<option>Emu.</option>
18+
<option>{{ $frontmatter.otherPrefix }}</option>
19+
</select>&nbsp;<select id="major">
1420
<option />
1521
<option>11</option>
1622
<option>10</option>

docs/get-started.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
noneSelected: System model is required.
33
invalidVersion: This doesn't seem to be a valid system version.
4+
otherPrefix: (Other)
45
head: [
56
['script', {src: '/assets/js/common.js'}],
67
['script', {src: '/assets/js/selecting.js'}]

docs/public/assets/js/selecting.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ function can_mset9(major, minor, native, region, model) {
152152
- All models
153153
*/
154154
function redirect() {
155+
const prefix = document.getElementById("prefix").value;
155156
const major = document.getElementById("major").value;
156157
const minor = document.getElementById("minor").value;
157158
const nver = document.getElementById("nver").value;
@@ -170,14 +171,19 @@ function redirect() {
170171
if(isO3DS) model = DEVICE_O3DS
171172
else if(isN3DS) model = DEVICE_N3DS;
172173

173-
if (!validate_version(major, minor, nver, region, model)) {
174+
if (prefix == '' || !validate_version(major, minor, nver, region, model)) {
174175
document.getElementById("result_invalidVersion").style.display = "block";
175176
return;
176177
}
177178

178179
// Store selected version for some later pages
179180
sessionStorage.setItem("selected_version", JSON.stringify({major, minor, nver, region, model}));
180181

182+
if(prefix != "Ver.") {
183+
window.location.href = "checking-for-cfw";
184+
return true;
185+
}
186+
181187
const redirected = [
182188
can_soundhax,
183189
can_ssloth,

0 commit comments

Comments
 (0)