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

Move version selector to its own include

This time, it's an HTML include, and not a relative include.

We can make use of the existing captures done for invalidVersion and
methodUnavailable by passing it to the include flag.

Move all HTML tags into the new HTML include so that it doesn't show on
Crowdin, this way translations aren't broken every time something in
the HTML tags change. One change will fix all of it.

Also, do not show the version selector if JS is not supported on the
browser. This can be done with a simple JS to display the script
automatically, which will by definition not show the selector when JS
isn't enabled as the JS to turn it on can't run.
This commit is contained in:
lifehackerhansol
2023-03-21 17:15:50 -07:00
committed by lifehackerhansol
parent c6917ea073
commit 347eb4040d
2 changed files with 109 additions and 102 deletions

View File

@@ -0,0 +1,108 @@
<div id="selectversion" class="selectversion" style="display:none">
<br>
<select id="major">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
</select>.<select id="minor">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
</select>.<select id="whydidnintendodecidetodothingslikethis">
<option>0</option>
</select>-<select id="nver">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<option>24</option>
<option>25</option>
<option>26</option>
<option>27</option>
<option>28</option>
<option>29</option>
<option>30</option>
<option>31</option>
<option>32</option>
<option>33</option>
<option>34</option>
<option>35</option>
<option>36</option>
<option>37</option>
<option>38</option>
<option>39</option>
<option>40</option>
<option>41</option>
<option>42</option>
<option>43</option>
<option>44</option>
<option>45</option>
<option>46</option>
<option>47</option>
<option>48</option>
<option>49</option>
</select><select id="region">
<option>E</option>
<option>U</option>
<option>J</option>
<option>K</option>
<option>T</option>
<option>C</option>
</select>
<br>
<input type="button" onclick="redirect()" value="Confirm">
</div>
<script>
document.getElementById("selectversion").style.display = "block";
</script>
<p id="result_invalidVersion" style="display:none">{{ include.invalidVersion }}</p>
<p id="result_methodUnavailable" style="display:none">{{ include.methodUnavailable }}</p>
<script src="/assets/js/selecting.js"></script>
<noscript>Please enable JavaScript to continue with the guide.</noscript>