aboutsummaryrefslogtreecommitdiffstats
path: root/public/js/transfer.js
diff options
context:
space:
mode:
authorLibravatar vantezzen <hello@vantezzen.io>2019-10-19 15:41:31 +0200
committerLibravatar vantezzen <hello@vantezzen.io>2019-10-19 15:41:31 +0200
commit5bf9eb5898f14afc66f690c866637b4815195bad (patch)
tree08e772531561928f9152a559b43c1e74909886c5 /public/js/transfer.js
parentBump version number (diff)
downloadferdium-server-5bf9eb5898f14afc66f690c866637b4815195bad.tar.gz
ferdium-server-5bf9eb5898f14afc66f690c866637b4815195bad.tar.zst
ferdium-server-5bf9eb5898f14afc66f690c866637b4815195bad.zip
Add page to transfer user accounts
Diffstat (limited to 'public/js/transfer.js')
-rw-r--r--public/js/transfer.js14
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 */
2const submitBtn = document.getElementById('submit');
3const fileInput = document.getElementById('file');
4const fileOutput = document.getElementById('fileoutput');
5
6fileInput.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})