Skip to content

Commit f31ca81

Browse files
committed
Fix the OS detection for quickstart
1 parent fb97a1c commit f31ca81

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,11 @@ Compiling on the Android device itself using Termux (video tutorial can be found
114114
<script type="text/javascript">
115115

116116
function clickTab(tab) {
117-
document.querySelector('li.tabcontrol[data-name="'+tab+'"]').click();
117+
var tabs = document.querySelectorAll('div.nav-tabs .nav-link');
118+
tabs[tab].click();
118119
}
119120

120-
$(document).ready(function(){
121+
document.addEventListener("DOMContentLoaded", function(event) {
121122
var ua = navigator.userAgent || navigator.vendor || window.opera;
122123
if (/android/i.test(ua)) {
123124
clickTab("android");
@@ -129,13 +130,13 @@ Compiling on the Android device itself using Termux (video tutorial can be found
129130

130131
var os = window.navigator.platform;
131132
if (os == "win32") {
132-
clickTab("windows");
133+
clickTab(0);
133134
} else if (os == "MacIntel") {
134-
clickTab("macos");
135+
clickTab(1);
135136
} else if (os == "Linux i686" || os == "Linux x86_64" || os == "Linux armv7l" || os == "Linux armv8l") {
136-
clickTab("linux");
137+
clickTab(2);
137138
} else if (os == "FreeBSD i386" || os == "FreeBSD amd64" || os == "OpenBSD i386" || os == "OpenBSD amd64" || os == "NetBSD i386" || os == "NetBSD amd64") {
138-
clickTab("bsd");
139+
clickTab(3);
139140
}
140141
});
141142
</script>

0 commit comments

Comments
 (0)