diff options
author | vantezzen <hello@vantezzen.io> | 2019-10-19 15:41:31 +0200 |
---|---|---|
committer | vantezzen <hello@vantezzen.io> | 2019-10-19 15:41:31 +0200 |
commit | 5bf9eb5898f14afc66f690c866637b4815195bad (patch) | |
tree | 08e772531561928f9152a559b43c1e74909886c5 /public | |
parent | Bump version number (diff) | |
download | ferdium-server-5bf9eb5898f14afc66f690c866637b4815195bad.tar.gz ferdium-server-5bf9eb5898f14afc66f690c866637b4815195bad.tar.zst ferdium-server-5bf9eb5898f14afc66f690c866637b4815195bad.zip |
Add page to transfer user accounts
Diffstat (limited to 'public')
-rw-r--r-- | public/js/transfer.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/public/js/transfer.js b/public/js/transfer.js new file mode 100644 index 0000000..d3d23b3 --- /dev/null +++ b/public/js/transfer.js | |||
@@ -0,0 +1,14 @@ | |||
1 | /* eslint-env browser */ | ||
2 | const submitBtn = document.getElementById('submit'); | ||
3 | const fileInput = document.getElementById('file'); | ||
4 | const fileOutput = document.getElementById('fileoutput'); | ||
5 | |||
6 | fileInput.addEventListener('change', () => { | ||
7 | const reader = new FileReader(); | ||
8 | reader.onload = function () { | ||
9 | const text = reader.result; | ||
10 | fileOutput.value = text; | ||
11 | submitBtn.disabled = false; | ||
12 | }; | ||
13 | reader.readAsText(fileInput.files[0]); | ||
14 | }) | ||