aboutsummaryrefslogtreecommitdiff
path: root/app/static
diff options
context:
space:
mode:
Diffstat (limited to 'app/static')
-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