diff --git a/files/assets/js/chat.js b/files/assets/js/chat.js index 2b0729db0..5bd143767 100644 --- a/files/assets/js/chat.js +++ b/files/assets/js/chat.js @@ -14,6 +14,7 @@ const chat_id = document.getElementById('chat_id').value const chatline = document.getElementsByClassName('chat-line')[0] const box = document.getElementById('chat-window') const ta = document.getElementById('input-text-chat') +const image_preview = document.getElementById('image-preview') const vid = document.getElementById('vid').value const slurreplacer = document.getElementById('slurreplacer').value @@ -399,8 +400,6 @@ function handle_files() { input.previousElementSibling.className = ""; input.previousElementSibling.textContent = input.files[0].name.substr(0, char_limit); - const image_preview = document.getElementById('image-preview') - if (input.files[0].type.startsWith('image/')) { const fileReader = new FileReader(); fileReader.readAsDataURL(input.files[0]);