Update index.html

This commit is contained in:
Anirudh Sevugan 2025-08-03 20:31:08 -05:00 committed by GitHub
parent 8d9dff9eb1
commit ceefa47c9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,6 +18,28 @@
worker-src 'self' blob:;
">
<script>
document.addEventListener("keydown", function(e) {
if (e.key === "Enter") {
const focused = document.activeElement;
if (focused) {
// If focus is on a button, just click it
if (focused.tagName === "BUTTON") {
focused.click();
e.preventDefault();
}
// If focus is on a text input or checkbox, find the highlighted button and click it
else if (focused.tagName === "INPUT") {
// You can define which button to click here.
// For example, the button with id="myButton"
focused.focus();
}
}
}
});
</script>
<link rel="icon" type="image/x-icon" href="images/favicon.ico">
<link rel="stylesheet" href="styles.css">
<script src="lib/dash.js"></script>
@ -93,3 +115,4 @@
</html>