diff options
author | 2024-02-10 18:19:14 -0700 | |
---|---|---|
committer | 2024-02-13 06:59:44 +0530 | |
commit | 7584d2d7a7110aef0331ebfa178b2295842c59fa (patch) | |
tree | 900cd71237e6231b57936fcce77ff229cd459041 /public/js/transfer.js | |
parent | upgrade recipes submodule (diff) | |
download | ferdium-server-7584d2d7a7110aef0331ebfa178b2295842c59fa.tar.gz ferdium-server-7584d2d7a7110aef0331ebfa178b2295842c59fa.tar.zst ferdium-server-7584d2d7a7110aef0331ebfa178b2295842c59fa.zip |
refactor: project maintenance
- work in progress
Diffstat (limited to 'public/js/transfer.js')
-rw-r--r-- | public/js/transfer.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/public/js/transfer.js b/public/js/transfer.js index b4ba14c..4bf46fa 100644 --- a/public/js/transfer.js +++ b/public/js/transfer.js | |||
@@ -1,15 +1,15 @@ | |||
1 | /* eslint-env browser */ | 1 | /* eslint-env browser */ |
2 | const submitBtn = document.querySelector('#submit'); | 2 | const submitBtn = document.querySelector('#submit') |
3 | const fileInput = document.querySelector('#file'); | 3 | const fileInput = document.querySelector('#file') |
4 | const fileOutput = document.querySelector('#fileoutput'); | 4 | const fileOutput = document.querySelector('#fileoutput') |
5 | 5 | ||
6 | fileInput.addEventListener('change', () => { | 6 | fileInput.addEventListener('change', () => { |
7 | const reader = new FileReader(); | 7 | const reader = new FileReader() |
8 | reader.addEventListener('load', () => { | 8 | reader.addEventListener('load', () => { |
9 | const text = reader.result; | 9 | const text = reader.result |
10 | fileOutput.value = text; | 10 | fileOutput.value = text |
11 | submitBtn.disabled = false; | 11 | submitBtn.disabled = false |
12 | }); | 12 | }) |
13 | // eslint-disable-next-line unicorn/prefer-blob-reading-methods | 13 | // eslint-disable-next-line unicorn/prefer-blob-reading-methods |
14 | reader.readAsText(fileInput.files[0]); | 14 | reader.readAsText(fileInput.files[0]) |
15 | }); | 15 | }) |