From 25a33413ce71effeb7ef3be085c9b72ed391ec82 Mon Sep 17 00:00:00 2001 From: Florian <88926852+Gruetzig@users.noreply.github.com> Date: Sun, 12 Mar 2023 11:08:02 +0100 Subject: [PATCH] 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 --- _data/navigation/en_US.yml | 6 + _pages/en_US/get-started.txt | 146 +++++++++++++----- _pages/en_US/include/seedminer.txt | 68 ++++++++ _pages/en_US/include/soundhax.txt | 62 ++++++++ .../installing-boot9strap-(soundhax).txt | 55 +------ .../installing-boot9strap-(soundhax-sp).txt | 33 ++++ _pages/en_US/seedminer-(twn).txt | 16 ++ _pages/en_US/seedminer.txt | 59 +------ _pages/en_US/site-navigation.txt | 2 + assets/css/main.scss | 29 +++- assets/js/_main.js | 2 +- assets/js/selecting.js | 69 +++++++++ 12 files changed, 398 insertions(+), 149 deletions(-) create mode 100644 _pages/en_US/include/seedminer.txt create mode 100644 _pages/en_US/include/soundhax.txt create mode 100644 _pages/en_US/installing-boot9strap-(soundhax-sp).txt create mode 100644 _pages/en_US/seedminer-(twn).txt create mode 100644 assets/js/selecting.js diff --git a/_data/navigation/en_US.yml b/_data/navigation/en_US.yml index ae7a3e655c..2d8565fe38 100644 --- a/_data/navigation/en_US.yml +++ b/_data/navigation/en_US.yml @@ -64,6 +64,9 @@ sidebar_pages: - title: Seedminer url: seedminer + - + title: Seedminer (TWN) + url: seedminer-(twn) - title: BannerBomb3 url: bannerbomb3 @@ -97,6 +100,9 @@ sidebar_pages: - title: Installing boot9strap (Soundhax) url: installing-boot9strap-(soundhax) + - + title: Installing boot9strap (Soundhax-sp) + url: installing-boot9strap-(soundhax-sp) - title: Installing boot9strap (SSLoth-Browser) url: installing-boot9strap-(ssloth-browser) diff --git a/_pages/en_US/get-started.txt b/_pages/en_US/get-started.txt index afcba3853a..6875dbe2e2 100644 --- a/_pages/en_US/get-started.txt +++ b/_pages/en_US/get-started.txt @@ -23,42 +23,116 @@ If you see an unusual menu, STOP - you already have custom firmware! Continue fr #### Section III - Select a Method -Use the version table below to select a method. A few things to note: - + The version table below is *inclusive*. For example, "from 11.4.0 to 11.15.0" includes 11.4.0, 11.15.0, and all versions in between. - + Software versions do not work the same as decimals. Versions 11.10.0 and above are newer than 11.3.0, and are therefore not compatible with Soundhax. - + The number and letter after the system version are not important. - + No matter the method you follow, the end result is the same (boot9strap+Luma3DS custom firmware setup on the latest firmware). +To find the correct method for your device, please enter the system version you found in Section II. +
+
+..- +
+ +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
System VersionWhat to do
11.16.0 (latest version)Seedminer
11.14.0 to 11.15.0Update your 3DS to the latest version through System Settings
11.4.0 to 11.13.0Installing boot9strap (SSLoth-Browser)
1.0.0 to 11.3.0Installing boot9strap (Soundhax)
+{% capture invalidVersion %} +This doesn't seem to be a valid system version version. +{% endcapture %} + +{% capture methodUnavailable %} +You currently cannot hack your 3DS on this version using the main methods. If you want to hack your console, you have to use ntrboot. +{% endcapture %} + + + + --- #### Alternate Methods @@ -70,3 +144,5 @@ Otherwise, methods that work on all versions are available, but require addition 1. [kartdlphax](installing-boot9strap-(kartdlphax)) - requires a second hacked 3DS and a copy of Mario Kart 7 1. [ntrboot](ntrboot) - requires compatible DS flashcart 1. [Installing boot9strap (Hardmod)](installing-boot9strap-(hardmod)) - requires soldering + + \ No newline at end of file diff --git a/_pages/en_US/include/seedminer.txt b/_pages/en_US/include/seedminer.txt new file mode 100644 index 0000000000..d7575872bd --- /dev/null +++ b/_pages/en_US/include/seedminer.txt @@ -0,0 +1,68 @@ +{% capture technical_info %} +Technical Details (optional) + +To install boot9strap on your device, we derive your device's unique encryption key. To accomplish this, we use a tool called Seedminer to calculate the data encryption key (movable.sed) for your device. + +For information on how Seedminer works, see [this presentation](https://zoogie.github.io/web/34⅕c3). + +This method uses a powerful graphics card to perform the calculations needed. A volunteer-run website is used for the purpose of assisting you with this method. + +{% endcapture %} +
{{ technical_info | markdownify }}
+{: .notice--info} + + +### Section I - Updating the System + +In this section, you will update your system to the latest version, which is necessary for Seedminer. + +1. Update your device by going to System Settings, then "Other Settings", then going all the way to the right and using "System Update" + + The updater may display a message saying "Your system is up to date" instead of updating. This is normal if you are already up to date; continue to the next section + + If this gives you an error, set both your DNS settings and Proxy settings to "Auto" + +### Section II - Prep Work + +In this section, you will get the necessary details from your 3DS that are required to figure out your device's encryption key. + +1. Power off your device +1. Insert your SD card into your computer +1. Navigate to the `Nintendo 3DS` folder on your SD card + + If you don't have a `Nintendo 3DS` folder, put your SD card into your 3DS and power it on so that the folder can be created +1. Copy the name of the 32-letter folder you see directly inside Nintendo 3DS + + This 32-letter name is system-specific and will be different for each console + + If you see multiple 32-letter folders, follow [these instructions](troubleshooting#seedminer) + + You can ignore the `private` folder if you have it + + ![]({{ "/images/screenshots/seedminer/id0-example.png" | absolute_url }}) + {: .notice--info} +1. Paste your 32-letter folder name into [a document](/images/screenshots/seedminer/text-document.png) you can reference later + + This folder is known as your "ID0". Take note of this as this guide will refer to it as such later +1. Power on your device + + Your SD card does not need to be inserted at this point +1. Go to your Friend List (the [orange Face Icon]({{ "/images/friend-list-icon.png" | absolute_url }}) in the top row of your HOME Menu) + + If you receive an error and are kicked out of the menu, you either must create a new Mii or your device cannot connect to Nintendo's servers (due to a ban or connection issues) +1. Find your Mii profile, then find the "Friend Code" field on the top screen + +### Section III - Seedminer + +In this section, you will use the Bruteforce Movable website to retrieve your device's encryption key in the form of `movable.sed`. + +1. Open [Bruteforce Movable](https://seedminer.hacks.guide/) on your computer + + If the site isn't working, join [Nintendo Homebrew on Discord](https://discord.gg/MWxPgEp) and ask (in English) for someone there to assist you +1. Enter your device's Friend Code (with no spaces or dashes) into the "Your friend code" field +1. Paste your device's 32 character long folder name into the "Your ID0" field + + Do not attempt to enter the ID0 manually, as it is easy to make a mistake. Ensure the ID0 is entered correctly by copying and pasting it from where you saved it in the previous section +1. Select "Go" + + If the site immediately goes to step 4, the website has already correctly processed your bruteforce request. You can download your `movable.sed` file and continue to the next section. You do not need to (re-)add the bot +1. Use the ["Register Friend" button](/images/screenshots/seedminer/register-friend.png) on your device to add the bot's friend code as given by the website + + If prompted, the name that you give to the friend does not matter +1. Wait for the site to update + + If it does not, wait a few minutes before refreshing the page once +1. Once the site processes your information, the site will continue to `Step 2: Bruteforce` automatically +1. Wait for the remainder of the process to complete + + This is usually fast (1-5 minutes) + + During this process, the bot you added may not show up on your 3DS. As long as the website updates, this is not an issue + + If you are still waiting after half an hour, join [Nintendo Homebrew on Discord](https://discord.gg/MWxPgEp) and ask (in English) for someone there to assist you +1. When the process is completed, download your `movable.sed` file from the site + + Keep this file as you will need it in the upcoming page +1. Power off your device \ No newline at end of file diff --git a/_pages/en_US/include/soundhax.txt b/_pages/en_US/include/soundhax.txt new file mode 100644 index 0000000000..af89a1ca03 --- /dev/null +++ b/_pages/en_US/include/soundhax.txt @@ -0,0 +1,62 @@ +### What You Need +{%- if include.sp == "true" %} +* The latest release of [Soundhax](http://soundhax.com) *(for your region and device)* + + for the version, use: + + 1.x - 2.1 if the two numbers before the region in the system version string are between 0 and 2 + + 2.1 - 2.2 if they are between 3 and 4 + + 3.x - 4.x if they are between 5 and 10 + + 5.x - 11.3 if they are between 11 and 36 +{%- else %} +* The latest release of [Soundhax](http://soundhax.com) *(for your region, device, and version)* +{%- endif %} + + If Soundhax appears in your browser as an unplayable video, press Ctrl+S or Cmd+S to save it to your computer +* The latest release of [SafeB9SInstaller](https://github.com/d0k3/SafeB9SInstaller/releases/download/v0.0.7/SafeB9SInstaller-20170605-122940.zip) (direct download) +* The latest release of [boot9strap](https://github.com/SciresM/boot9strap/releases/download/1.4/boot9strap-1.4.zip) (direct download) +* The latest release of [Luma3DS](https://github.com/LumaTeam/Luma3DS/releases/latest) (the Luma3DS `.zip` file) +* The latest release of [universal-otherapp](https://github.com/TuxSH/universal-otherapp/releases/latest) (`otherapp.bin`) + +### Instructions + +#### Section I - Prep Work + +In this section, you will copy the files needed to trigger both Soundhax and universal-otherapp. + +1. Power off your device +1. Insert your SD card into your computer +1. Copy the Soundhax `.m4a` to the root of your SD card + + The root of the SD card refers to the initial directory on your SD card where you can see the Nintendo 3DS folder, but are not inside of it +1. Copy `otherapp.bin` to the root of your SD card +1. Copy `boot.firm` and `boot.3dsx` from the Luma3DS `.zip` to the root of your SD card +1. Create a folder named `boot9strap` on the root of your SD card +1. Copy `boot9strap.firm` and `boot9strap.firm.sha` from the boot9strap `.zip` to the `/boot9strap/` folder on your SD card +1. Copy `SafeB9SInstaller.bin` from the SafeB9SInstaller `.zip` to the root of your SD card +1. Reinsert your SD card into your device +1. Power on your device + +![]({{ "/images/screenshots/uosoundhax-root-layout.png" | absolute_url }}) +{: .notice--info} + +![]({{ "/images/screenshots/boot9strap-folder.png" | absolute_url }}) +{: .notice--info} + +#### Section II - Launching SafeB9SInstaller + +In this section, you will launch Soundhax through the Nintendo 3DS Sound app, which will use universal-otherapp to launch the boot9strap (custom firmware) installer. + +1. Reinsert your SD card into your device +1. Power on your device +1. Launch Nintendo 3DS Sound + + ![]({{ "/images/screenshots/soundhax-welcome.png" | absolute_url }}) + {: .notice--info} + +1. If you've never opened Nintendo 3DS Sound before and get tips on how to use it from a bird icon, go through all of the bird tips, then close the app normally and relaunch it + + In this situation, launching Soundhax immediately would cause these tips to appear on every launch of the Nintendo 3DS Sound until this is done +1. Go to `/SDCARD`, then play "<3 nedwill 2016" + + This may take many tries + + If it freezes, force the console to power off by holding the power button, then try again + + ![]({{ "/images/screenshots/soundhax-launch.png" | absolute_url }}) + {: .notice--info} + +1. If the exploit was successful, you will have booted into SafeB9SInstaller \ No newline at end of file diff --git a/_pages/en_US/installing-boot9strap-(soundhax).txt b/_pages/en_US/installing-boot9strap-(soundhax).txt index a5b8ded94c..30b340409f 100644 --- a/_pages/en_US/installing-boot9strap-(soundhax).txt +++ b/_pages/en_US/installing-boot9strap-(soundhax).txt @@ -17,60 +17,7 @@ For technical details on the exploits that you will be using on this page, see [ Soundhax (when combined with universal-otherapp) is compatible with versions 1.0.0 through 11.3.0 in all regions. -### What You Need - -* The latest release of [Soundhax](http://soundhax.com) *(for your region, device, and version)* - + If Soundhax appears in your browser as an unplayable video, press Ctrl+S or Cmd+S to save it to your computer -* The latest release of [SafeB9SInstaller](https://github.com/d0k3/SafeB9SInstaller/releases/download/v0.0.7/SafeB9SInstaller-20170605-122940.zip) (direct download) -* The latest release of [boot9strap](https://github.com/SciresM/boot9strap/releases/download/1.4/boot9strap-1.4.zip) (direct download) -* The latest release of [Luma3DS](https://github.com/LumaTeam/Luma3DS/releases/latest) (the Luma3DS `.zip` file) -* The latest release of [universal-otherapp](https://github.com/TuxSH/universal-otherapp/releases/latest) (`otherapp.bin`) - -### Instructions - -#### Section I - Prep Work - -In this section, you will copy the files needed to trigger both Soundhax and universal-otherapp. - -1. Power off your device -1. Insert your SD card into your computer -1. Copy the Soundhax `.m4a` to the root of your SD card - + The root of the SD card refers to the initial directory on your SD card where you can see the Nintendo 3DS folder, but are not inside of it -1. Copy `otherapp.bin` to the root of your SD card -1. Copy `boot.firm` and `boot.3dsx` from the Luma3DS `.zip` to the root of your SD card -1. Create a folder named `boot9strap` on the root of your SD card -1. Copy `boot9strap.firm` and `boot9strap.firm.sha` from the boot9strap `.zip` to the `/boot9strap/` folder on your SD card -1. Copy `SafeB9SInstaller.bin` from the SafeB9SInstaller `.zip` to the root of your SD card -1. Reinsert your SD card into your device -1. Power on your device - -![]({{ "/images/screenshots/uosoundhax-root-layout.png" | absolute_url }}) -{: .notice--info} - -![]({{ "/images/screenshots/boot9strap-folder.png" | absolute_url }}) -{: .notice--info} - -#### Section II - Launching SafeB9SInstaller - -In this section, you will launch Soundhax through the Nintendo 3DS Sound app, which will use universal-otherapp to launch the boot9strap (custom firmware) installer. - -1. Reinsert your SD card into your device -1. Power on your device -1. Launch Nintendo 3DS Sound - - ![]({{ "/images/screenshots/soundhax-welcome.png" | absolute_url }}) - {: .notice--info} - -1. If you've never opened Nintendo 3DS Sound before and get tips on how to use it from a bird icon, go through all of the bird tips, then close the app normally and relaunch it - + In this situation, launching Soundhax immediately would cause these tips to appear on every launch of the Nintendo 3DS Sound until this is done -1. Go to `/SDCARD`, then play "<3 nedwill 2016" - + This may take many tries - + If it freezes, force the console to power off by holding the power button, then try again - - ![]({{ "/images/screenshots/soundhax-launch.png" | absolute_url }}) - {: .notice--info} - -1. If the exploit was successful, you will have booted into SafeB9SInstaller +{% include_relative include/soundhax.txt %} #### Section III - Installing boot9strap diff --git a/_pages/en_US/installing-boot9strap-(soundhax-sp).txt b/_pages/en_US/installing-boot9strap-(soundhax-sp).txt new file mode 100644 index 0000000000..8cc2fc6b4c --- /dev/null +++ b/_pages/en_US/installing-boot9strap-(soundhax-sp).txt @@ -0,0 +1,33 @@ +--- +title: "Installing boot9strap (Soundhax)" +--- + +{% include toc title="Table of Contents" %} + +{% capture technical_info %} +Technical Details (optional) + +For technical details on the exploits that you will be using on this page, see [here](https://github.com/nedwill/soundhax) (Soundhax) and [here](https://github.com/TuxSH/universal-otherapp) (universal-otherapp). + +{% endcapture %} +
{{ technical_info | markdownify }}
+{: .notice--info} + +### Compatibility Notes + +This Soundhax method (when combined with universal-otherapp) is compatible with versions 1.0.0-0 through 11.10.0-36 in all regions. If the two numbers before the region in the system version string is equal to or more than 37, Soundhax is patched and won't work. + +{% include_relative include/soundhax.txt sp= "true" %} + +#### Section III - Installing boot9strap + +{% include_relative include/install-boot9strap-safeb9sinstaller.txt %} +{%- include_relative include/configure-luma3ds.txt %} + +{% include_relative include/luma3ds-installed-note.txt %} + + +___ + +### Continue to [Finalizing Setup](finalizing-setup) +{: .notice--primary} \ No newline at end of file diff --git a/_pages/en_US/seedminer-(twn).txt b/_pages/en_US/seedminer-(twn).txt new file mode 100644 index 0000000000..44cd314e3b --- /dev/null +++ b/_pages/en_US/seedminer-(twn).txt @@ -0,0 +1,16 @@ +--- +title: "Seedminer (TWN)" +--- + +{% include toc title="Table of Contents" %} + +{%- include_relative include/seedminer.txt %} + +___ + +### Next step: BannerBomb3 + +Once you have your device's encryption key (`movable.sed`), you will use it in conjunction with BannerBomb3, which uses your `movable.sed` file to take advantage of exploits in the System Settings application. + +Continue to [BannerBomb3 + Fredtool (TWN)](bannerbomb3-fredtool-(twn)) +{: .notice--primary} \ No newline at end of file diff --git a/_pages/en_US/seedminer.txt b/_pages/en_US/seedminer.txt index 60b85168e7..baaa486fe1 100644 --- a/_pages/en_US/seedminer.txt +++ b/_pages/en_US/seedminer.txt @@ -4,64 +4,7 @@ title: "Seedminer" {% include toc title="Table of Contents" %} -{% capture technical_info %} -Technical Details (optional) - -To install boot9strap on your device, we derive your device's unique encryption key. To accomplish this, we use a tool called Seedminer to calculate the data encryption key (movable.sed) for your device. - -For information on how Seedminer works, see [this presentation](https://zoogie.github.io/web/34⅕c3). - -This method uses a powerful graphics card to perform the calculations needed. A volunteer-run website is used for the purpose of assisting you with this method. - -{% endcapture %} -
{{ technical_info | markdownify }}
-{: .notice--info} - -### Section I - Prep Work - -In this section, you will get the necessary details from your 3DS that are required to figure out your device's encryption key. - -1. Insert your SD card into your computer -1. Navigate to the `Nintendo 3DS` folder on your SD card - + If you don't have a `Nintendo 3DS` folder, put your SD card into your 3DS and power it on so that the folder can be created -1. Copy the name of the 32-letter folder you see directly inside Nintendo 3DS - + This 32-letter name is system-specific and will be different for each console - + If you see multiple 32-letter folders, follow [these instructions](troubleshooting#seedminer) - + You can ignore the `private` folder if you have it - - ![]({{ "/images/screenshots/seedminer/id0-example.png" | absolute_url }}) - {: .notice--info} -1. Paste your 32-letter folder name into [a document](/images/screenshots/seedminer/text-document.png) you can reference later - + This folder is known as your "ID0". Take note of this as this guide will refer to it as such later -1. Power on your device - + Your SD card does not need to be inserted at this point -1. Go to your Friend List (the [orange Face Icon]({{ "/images/friend-list-icon.png" | absolute_url }}) in the top row of your HOME Menu) - + If you receive an error and are kicked out of the menu, you either must create a new Mii or your device cannot connect to Nintendo's servers (due to a ban or connection issues) -1. Find your Mii profile, then find the "Friend Code" field on the top screen - -### Section II - Seedminer - -In this section, you will use the Bruteforce Movable website to retrieve your device's encryption key in the form of `movable.sed`. - -1. Open [Bruteforce Movable](https://seedminer.hacks.guide/) on your computer - + If the site isn't working, join [Nintendo Homebrew on Discord](https://discord.gg/MWxPgEp) and ask (in English) for someone there to assist you -1. Enter your device's Friend Code (with no spaces or dashes) into the "Your friend code" field -1. Paste your device's 32 character long folder name into the "Your ID0" field - + Do not attempt to enter the ID0 manually, as it is easy to make a mistake. Ensure the ID0 is entered correctly by copying and pasting it from where you saved it in the previous section -1. Select "Go" - + If the site immediately goes to step 4, the website has already correctly processed your bruteforce request. You can download your `movable.sed` file and continue to the next section. You do not need to (re-)add the bot -1. Use the ["Register Friend" button](/images/screenshots/seedminer/register-friend.png) on your device to add the bot's friend code as given by the website - + If prompted, the name that you give to the friend does not matter -1. Wait for the site to update - + If it does not, wait a few minutes before refreshing the page once -1. Once the site processes your information, the site will continue to `Step 2: Bruteforce` automatically -1. Wait for the remainder of the process to complete - + This is usually fast (1-5 minutes) - + During this process, the bot you added may not show up on your 3DS. As long as the website updates, this is not an issue - + If you are still waiting after half an hour, join [Nintendo Homebrew on Discord](https://discord.gg/MWxPgEp) and ask (in English) for someone there to assist you -1. When the process is completed, download your `movable.sed` file from the site - + Keep this file as you will need it in the upcoming pages -1. Power off your device +{% include_relative include/seedminer.txt %} ___ diff --git a/_pages/en_US/site-navigation.txt b/_pages/en_US/site-navigation.txt index 7e5f474451..4cb226dd55 100644 --- a/_pages/en_US/site-navigation.txt +++ b/_pages/en_US/site-navigation.txt @@ -48,6 +48,7 @@ sitemap: false * [Installing boot9strap (kartdlphax)](installing-boot9strap-(kartdlphax)) + [Installing boot9strap (ntrboot)](installing-boot9strap-(ntrboot)) + [Installing boot9strap (Soundhax)](installing-boot9strap-(soundhax)) ++ [Installing boot9strap (Soundhax-sp)](installing-boot9strap-(soundhax-sp)) + [Installing boot9strap (SSLoth-Browser)](installing-boot9strap-(ssloth-browser)) + [Installing boot9strap (USM)](installing-boot9strap-(usm)) + [Key Information](key-information) @@ -56,6 +57,7 @@ sitemap: false + [Region Changing](region-changing) + [Restoring / Updating CFW](restoring-updating-cfw) + [Seedminer](seedminer) ++ [Seedminer (TWN)](seedminer-(twn)) + [Troubleshooting](troubleshooting) + [Uninstall CFW](uninstall-cfw) + [Updating B9S](updating-b9s) diff --git a/assets/css/main.scss b/assets/css/main.scss index 23346e773b..97a672cf7c 100644 --- a/assets/css/main.scss +++ b/assets/css/main.scss @@ -5,4 +5,31 @@ @charset "utf-8"; @import "minimal-mistakes/skins/{{ site.minimal_mistakes_skin | default: 'default' }}"; // skin -@import "minimal-mistakes"; // main partials \ No newline at end of file +@import "minimal-mistakes"; // main partials + +select { + background-color: #2e3440; + color: #d8dee9; + font-weight: bold; + cursor: pointer; + border: 3px solid #585d66; +} + +input { + color: #d8dee9; + font-weight: bold; + cursor: pointer; + border: 1px solid #585d66; +} + +input:hover { + background-color: #767a80; +} + +.selectversion { + background-color: #2e3440; + text-align: center; + border: 1px solid #585d66; + border-radius: 10px; +} + diff --git a/assets/js/_main.js b/assets/js/_main.js index 400df0354b..79d8fad981 100644 --- a/assets/js/_main.js +++ b/assets/js/_main.js @@ -305,4 +305,4 @@ $(document).ready(function() { } } } -}); +}); \ No newline at end of file diff --git a/assets/js/selecting.js b/assets/js/selecting.js new file mode 100644 index 0000000000..9d58f3e27c --- /dev/null +++ b/assets/js/selecting.js @@ -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); + } +}