Skip to content

Commit

Permalink
Make it easier to file bug reports
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed Apr 27, 2016
1 parent f13bc7f commit fab82da
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
14 changes: 10 additions & 4 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<body id="idx">

<a id="platform-button" style="display: none;" href="#">
click to cycle platforms
click or press "n" to cycle platforms
</a>

<p id="pitch">
Expand Down Expand Up @@ -53,9 +53,15 @@
<p>I don't recognize your platform.</p>
<p>
rustup runs on Windows, Linux, Mac OS X, FreeBSD and NetBSD. If
you are on one of these platforms and are seeing this then either
JavaScript is disabled or this website is buggy and
<a href="https://github.com/rust-lang-nursery/rustup.rs/issues/new">should be reported.</a>
you are on one of these platforms and are seeing this then please
<a href="https://github.com/rust-lang-nursery/rustup.rs/issues/new">report an issue</a>,
along with the following values:
<div>
<div>navigator.platform:</div>
<div id="nav-plat"></div>
<div>navigator.appVersion:</div>
<div id="nav-app"></div>
</div>
</p>
</div>

Expand Down
5 changes: 5 additions & 0 deletions www/rustup.css
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ hr {
letter-spacing: 0.1em;
}

#platform-instructions-unknown div {
font-size: 16px;
line-height: 2em;
}

#about {
font-size: 16px;
line-height: 2em;
Expand Down
14 changes: 14 additions & 0 deletions www/rustup.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,19 @@ function set_up_cycle_button() {

var key="test";
var idx=0;
var unlocked=false;

document.onkeypress = function(event) {
if (event.key == "n" && unlocked) {
cycle_platform();
}

if (event.key == key[idx]) {
idx += 1;

if (idx == key.length) {
cycle_button.style.display = "block";
unlocked = true;
}
} else if (event.key == key[0]) {
idx = 1;
Expand All @@ -101,7 +107,15 @@ function set_up_cycle_button() {
};
}

function fill_in_bug_report_values() {
var nav_plat = document.getElementById("nav-plat");
var nav_app = document.getElementById("nav-app");
nav_plat.textContent = navigator.platform;
nav_app.textContent = navigator.appVersion;
}

(function () {
adjust_for_platform();
set_up_cycle_button();
fill_in_bug_report_values();
}());

0 comments on commit fab82da

Please sign in to comment.