copy gsp to clipboard, order task separately

This commit is contained in:
2025-10-08 10:54:20 +02:00
parent 6c489b8d05
commit 2aa4b580c5
4 changed files with 23 additions and 10 deletions

View File

@@ -34,9 +34,22 @@
<input type="submit" value="Odeslat">
</form>
{{else}}
<p>Souřadnice další šifry: {{.Coordinates}}</p>
<p>
Souřadnice další šifry:
<input id="gps" value="{{.Coordinates}}" readonly />
<br>
<button onclick="copyToClipboard()">Zkopírovat do schránky</button>
</p>
<p>Nápověda k nalezení cíle: {{.FinalClue}}</p>
{{end}}
</body>
<script>
function copyToClipboard() {
let copyText = document.querySelector("#gps");
copyText.select();
document.execCommand("copy");
}
</script>
</html>