1
0
mirror of https://github.com/golang/go synced 2024-11-18 11:04:42 -07:00

cmd/present: do not show help text on localhost

Also allow escape key to hide help text.

Fixes golang/go#9950

Change-Id: Ifcffbafda68d383e529f4ad6119b384a9c5cef6a
Reviewed-on: https://go-review.googlesource.com/5531
Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2015-02-22 13:41:11 -08:00
parent e0e177e896
commit 97b1f37055

View File

@ -399,6 +399,7 @@ function handleBodyKeyDown(event) {
switch (event.keyCode) {
case 72: // 'H' hides the help text
case 27: // escape key
if (!inCode) hideHelpText();
break;
@ -483,6 +484,10 @@ function handleDomLoaded() {
setupInteraction();
if (window.location.hostname == "localhost" || window.location.hostname == "127.0.0.1" || window.location.hostname == "::1") {
hideHelpText();
}
document.body.classList.add('loaded');
};