Skip to content
This repository was archived by the owner on Mar 17, 2024. It is now read-only.

Commit 0de3369

Browse files
brsonAJ-Ianozi
authored andcommitted
Merge pull request rust-lang#1037 from malbarbo/android-links
Update links and install page to include android support
1 parent 3e8555f commit 0de3369

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

www/rustup.js

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
var platform_override = null;
22

3-
function android_or_unix() {
4-
return (navigator.appVersion.indexOf("Android") != -1) ? "android" : "unix";
5-
}
6-
73
function detect_platform() {
84
"use strict";
95

@@ -14,11 +10,12 @@ function detect_platform() {
1410
var os = "unknown";
1511

1612
if (navigator.platform == "Linux x86_64") {os = "unix";}
17-
if (navigator.platform == "Linux i686") {os = android_or_unix();}
13+
if (navigator.platform == "Linux i686") {os = "unix";}
1814
if (navigator.platform == "Linux i686 on x86_64") {os = "unix";}
19-
if (navigator.platform == "Linux aarch64") {os = android_or_unix();}
20-
if (navigator.platform == "Linux armv6l") {os = android_or_unix();}
21-
if (navigator.platform == "Linux armv7l") {os = android_or_unix();}
15+
if (navigator.platform == "Linux aarch64") {os = "unix";}
16+
if (navigator.platform == "Linux armv6l") {os = "unix";}
17+
if (navigator.platform == "Linux armv7l") {os = "unix";}
18+
if (navigator.platform == "Linux armv8l") {os = "unix";}
2219
if (navigator.platform == "Linux ppc64") {os = "unix";}
2320
if (navigator.platform == "Linux mips") {os = "unix";}
2421
if (navigator.platform == "Linux mips64") {os = "unix";}
@@ -47,22 +44,18 @@ function adjust_for_platform() {
4744

4845
var unix_div = document.getElementById("platform-instructions-unix");
4946
var win_div = document.getElementById("platform-instructions-win");
50-
var android_div = document.getElementById("platform-instructions-android");
5147
var unknown_div = document.getElementById("platform-instructions-unknown");
5248
var default_div = document.getElementById("platform-instructions-default");
5349

5450
unix_div.style.display = "none";
5551
win_div.style.display = "none";
56-
android_div.style.display = "none";
5752
unknown_div.style.display = "none";
5853
default_div.style.display = "none";
5954

6055
if (platform == "unix") {
6156
unix_div.style.display = "block";
6257
} else if (platform == "win") {
6358
win_div.style.display = "block";
64-
} else if (platform == "android") {
65-
android_div.style.display = "block";
6659
} else if (platform == "unknown") {
6760
unknown_div.style.display = "block";
6861
} else {
@@ -80,8 +73,6 @@ function cycle_platform() {
8073
} else if (platform_override == "win") {
8174
platform_override = "unix";
8275
} else if (platform_override == "unix") {
83-
platform_override = "android";
84-
} else if (platform_override == "android") {
8576
platform_override = "default";
8677
}
8778
adjust_for_platform();

0 commit comments

Comments
 (0)