summaryrefslogtreecommitdiff
path: root/app/static/custom.js
diff options
context:
space:
mode:
authorKaran Jayachandra <mail@karanjayachandra.com>2025-07-14 12:25:55 +0200
committerKaran Jayachandra <mail@karanjayachandra.com>2025-07-14 12:25:55 +0200
commit729203409fb73fdbac19b8af9d647883a5ac96b0 (patch)
tree5cef1d2b3f7bb61551dd105974e66b11b81fff98 /app/static/custom.js
parentec3af3f76ae1785bfb8c1dfbc69788e95fc7954d (diff)
Back to working
Diffstat (limited to 'app/static/custom.js')
-rw-r--r--app/static/custom.js10
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