diff options
| -rw-r--r-- | flashcards.html | 1 | ||||
| -rw-r--r-- | script.js | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/flashcards.html b/flashcards.html index 98df131..b936f46 100644 --- a/flashcards.html +++ b/flashcards.html @@ -2,6 +2,7 @@ <html lang="en"> <head> <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Flashcard</title> <link rel="stylesheet" href="style.css"> </head> @@ -337,7 +337,6 @@ function showToast(message, duration = 3000) { } window.addEventListener("load", (event) => { - document.getElementById('cards-input').addEventListener('change', function(event) { const file = event.target.files[0]; if (!file) return; @@ -360,10 +359,12 @@ window.addEventListener("load", (event) => { reader.readAsText(file); // Read the file as text }); + document.getElementById('flashcard').addEventListener('click', function(event) { + flipCard(); + }); }); window.addEventListener('keydown', (event) => { - // console.log(event.code); if (event.code === 'Space') { flipCard(); } else if (event.code === 'Digit1' || event.code === "Numpad1") { |