homebrew_launcher/www/homebrew_launcher/index.html

119 lines
4.4 KiB
HTML
Raw Normal View History

2016-04-26 21:51:21 +02:00
<html>
<head>
</head>
<body>
<div id="text"></div>
<script type="text/javascript">
-->Browser detection code by Relys
browserInfo = "<p>Browser CodeName: " + navigator.appCodeName + "</p>";
browserInfo+= "<p>Browser Name: " + navigator.appName + "</p>";
browserInfo+= "<p>Browser Version: " + navigator.appVersion + "</p>";
browserInfo+= "<p>Cookies Enabled: " + navigator.cookieEnabled + "</p>";
browserInfo+= "<p>Platform: " + navigator.platform + "</p>";
browserInfo+= "<p>User-agent header: " + navigator.userAgent + "</p>";
-->Get platform and version number
platform = String(navigator.platform);
var version = navigator.appVersion;
-->Check to see if we're running on a Wii U
if(platform == "Nintendo WiiU")
{
-->If we are then parse out the exact browser version
var versionRE = version.match("NX\/(.*) NintendoBrowser\/");
-->Ensure we were able to get browser version
if(versionRE.length==2)
{
-->Store the exact browser version to a string
versionNumber=versionRE[1];
-->See if browser is for Wii U version 5.5.1
if(versionNumber == "3.0.4.2.12")
{
-->Display message and redirect to payload URL
document.getElementById("text").innerHTML="Detected Wii U Firmware version 5.5.1";
window.location = "payload.php?sysver=550";
}
2016-04-26 21:51:21 +02:00
-->See if browser is for Wii U version 5.5.0
else if(versionNumber == "3.0.4.2.11")
2016-04-26 21:51:21 +02:00
{
-->Display message and redirect to payload URL
document.getElementById("text").innerHTML="Detected Wii U Firmware version 5.5.0";
window.location = "payload.php?sysver=550";
}
-->See if browser is for Wii U version 5.4.0
else if(versionNumber == "3.0.4.2.9")
{
-->Display message and redirect to payload URL
document.getElementById("text").innerHTML="Detected Wii U Firmware version 5.4.0";
window.location = "payload.php?sysver=540";
}
-->See if browser is for Wii U version 5.3.2
else if(versionNumber == "3.0.3.12.15")
{
-->Display message and redirect to payload URL
document.getElementById("text").innerHTML="Detected Wii U Firmware version 5.3.2";
window.location = "payload532.html";
}
-->See if browser is for Wii U version 5.0.0 or 5.1.0
else if (versionNumber == "3.0.3.12.12")
{
-->Display message and redirect to payload URL
document.getElementById("text").innerHTML="Detected Wii U Firmware version 5.0.0 or 5.1.0";
window.location = "payload500.html";
}
-->See if browser is for Wii U version 4.1.0
else if (versionNumber == "3.0.3.12.11")
{
-->Display message and redirect to payload URL
document.getElementById("text").innerHTML="Detected Wii U Firmware version 4.1.0";
window.location = "payload410.html";
}
-->See if browser is for Wii U version 4.0.0
else if (versionNumber == "3.0.3.12.6")
{
-->Display message and redirect to payload URL
document.getElementById("text").innerHTML="Detected Wii U Firmware version 4.0.0";
window.location = "payload400.html";
}
-->See if browser is for Wii U version 3.0.0 or 3.1.0
else if (versionNumber == "2.1.0.10.9")
{
-->Display message and redirect to payload URL
document.getElementById("text").innerHTML="Detected Wii U Firmware version 3.0.0 or 3.1.0";
var check = new XMLHttpRequest();
check.open('HEAD', "payload310.html", false);
check.send();
if (check.status != 404)
window.location = "payload310.html";
else
window.location = "payload300.html";
}
-->See if browser is for Wii U version 2.1.0
else if (versionNumber == "2.1.0.8.23")
{
-->Display message and redirect to payload URL
document.getElementById("text").innerHTML="Detected Wii U Firmware version 2.1.0";
window.location = "payload210.html";
}
-->See if browser is for Wii U version 2.0.0
else if (versionNumber == "2.1.0.8.21")
{
-->Display message and redirect to payload URL
document.getElementById("text").innerHTML="Detected Wii U Firmware version 2.0.0";
window.location = "payload200.html";
}
}
-->If we couldn't parse the browser version, throw an error message
else
{
document.getElementById("text").innerHTML="Unsupported Wii U Browser: "+browserInfo;
}
}
-->If we couldn't detect the Wii U browser, throw an error message.
else
{
document.getElementById("text").innerHTML="Unsupported Operating System: "+browserInfo;
}
</script>
</body>
</html>