Add help button

This commit is contained in:
Nikolay Puzanov
2022-12-03 13:32:09 +03:00
parent 185dcb350d
commit 9939a226c8
2 changed files with 47 additions and 11 deletions

View File

@@ -94,6 +94,7 @@
<body>
<div id="buttons">
<button onclick="show_help()"><span class="text">?</span></button>
<button onclick="save_code('%SAVECODEURI%')"><span class="text">Save (ctrl-s)</span></button>
<button onclick="save_code('%SAVEASURI%')"><span class="text">Save as new</span></button>
Sim:
@@ -151,6 +152,10 @@
.then((text) => { window.location.href = text; });
};
function show_help() {
alert("%HELPSTRING%");
};
document.addEventListener('keydown', (e) => {
if (e.key.toLowerCase() === 's' && e.ctrlKey) {
e.preventDefault();