Skip to content

Commit

Permalink
Enter submits forms (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinNovak authored Dec 5, 2019
1 parent 28a1abe commit 92ea845
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions public/scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,21 @@ let steamSearchDownloadLink = document.getElementById(
"steam-search-download-link"
);

// Register events
steamAppUrlInput.addEventListener("keyup", event => {
if (event.keyCode === 13) {
event.preventDefault();
steamAppBtn.click();
}
});

steamSearchUrlInput.addEventListener("keyup", event => {
if (event.keyCode === 13) {
event.preventDefault();
steamSearchBtn.click();
}
});

async function retrieveSteamAppTitle() {
steamAppBtn.disabled = true;
hideElement(steamAppResultsDiv);
Expand Down

0 comments on commit 92ea845

Please sign in to comment.