summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
Diffstat (limited to 'static')
-rw-r--r--static/import.js21
1 files changed, 6 insertions, 15 deletions
diff --git a/static/import.js b/static/import.js
index 9f1eff6..aa29b87 100644
--- a/static/import.js
+++ b/static/import.js
@@ -72,24 +72,15 @@ const bytesToSize = (bytes) => {
return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i]
}
-const determineDragAndDropCapable = () => {
- const div = document.createElement('div')
- return (('draggable' in div)
- || ('ondragstart' in div && 'ondrop' in div))
- && 'FormData' in window
- && 'FileReader' in window
-}
-
/* MAIN */
document.addEventListener('DOMContentLoaded', () => {
- ['drag', 'dragstart', 'dragend', 'dragover', 'dragenter', 'dragleave']
- .forEach((evt) => {
- importForm.addEventListener(evt, (e) => {
- e.preventDefault()
- e.stopPropagation()
- })
- })
+ importInput.addEventListener("keyup", (e) => {
+ if (e.keyCode === 13) {
+ e.preventDefault();
+ importButton.click();
+ }
+ });
}, false)
const labelClicked = (e) => {