diff options
| author | Karan Jayachandra <mail@karanjayachandra.com> | 2025-07-14 12:25:55 +0200 |
|---|---|---|
| committer | Karan Jayachandra <mail@karanjayachandra.com> | 2025-07-14 12:25:55 +0200 |
| commit | 729203409fb73fdbac19b8af9d647883a5ac96b0 (patch) | |
| tree | 5cef1d2b3f7bb61551dd105974e66b11b81fff98 /app/static | |
| parent | ec3af3f76ae1785bfb8c1dfbc69788e95fc7954d (diff) | |
Back to working
Diffstat (limited to 'app/static')
| -rw-r--r-- | app/static/custom.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/static/custom.js b/app/static/custom.js index 2e4b049..47f64ca 100644 --- a/app/static/custom.js +++ b/app/static/custom.js @@ -84,4 +84,12 @@ document.getElementById("timer-dec").addEventListener('click', ()=> { minsPerRound -= 1;
resetTimer();
}
-});
\ No newline at end of file +});
+
+const fileInput = document.querySelector("#file-js input[type=file]");
+ fileInput.onchange = () => {
+ if (fileInput.files.length > 0) {
+ const fileName = document.querySelector("#file-js .file-name");
+ fileName.textContent = fileInput.files[0].name;
+ }
+};
\ No newline at end of file |
