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:
parent
e0e177e896
commit
97b1f37055
|
@ -399,6 +399,7 @@ function handleBodyKeyDown(event) {
|
||||||
|
|
||||||
switch (event.keyCode) {
|
switch (event.keyCode) {
|
||||||
case 72: // 'H' hides the help text
|
case 72: // 'H' hides the help text
|
||||||
|
case 27: // escape key
|
||||||
if (!inCode) hideHelpText();
|
if (!inCode) hideHelpText();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -483,6 +484,10 @@ function handleDomLoaded() {
|
||||||
|
|
||||||
setupInteraction();
|
setupInteraction();
|
||||||
|
|
||||||
|
if (window.location.hostname == "localhost" || window.location.hostname == "127.0.0.1" || window.location.hostname == "::1") {
|
||||||
|
hideHelpText();
|
||||||
|
}
|
||||||
|
|
||||||
document.body.classList.add('loaded');
|
document.body.classList.add('loaded');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue