diff --git a/core/client.js b/core/client.js index fa662318..c9cd34ea 100644 --- a/core/client.js +++ b/core/client.js @@ -835,22 +835,6 @@ function send(value) { } } -function dragHover(event) { - event.stopPropagation(); - event.preventDefault(); - let input = document.getElementById("input"); - if (event.type == "dragover") { - if (!input.classList.contains("drop")) { - input.classList.add("drop"); - gOriginalInput = input.value; - input.value = "drop file to upload"; - } - } else { - input.classList.remove("drop"); - input.value = gOriginalInput; - } -} - function fixImage(sourceData, maxWidth, maxHeight, callback) { let result = sourceData; let image = new Image(); @@ -880,52 +864,6 @@ function sendImage(image) { }); } -function fileDropRead(event) { - sendImage(event.target.result); -} - -function fileDrop(event) { - dragHover(event); - - let done = false; - if (!done) { - let files = event.target.files || event.dataTransfer.files; - for (let i = 0; i < files.length; i++) { - let file = files[i]; - if (file.type.substring(0, "image/".length) == "image/") { - let reader = new FileReader(); - reader.onloadend = fileDropRead; - reader.readAsDataURL(file); - done = true; - } - } - } - - if (!done) { - let html = event.dataTransfer.getData("text/html"); - let match = /