allow pasting images in initial modmail and DMs
parent
dd8e3255a0
commit
47dc6da582
|
@ -307,6 +307,15 @@ document.onpaste = function(event) {
|
||||||
f.files = files;
|
f.files = files;
|
||||||
document.getElementById('filename-show-edit-' + id).textContent = filename;
|
document.getElementById('filename-show-edit-' + id).textContent = filename;
|
||||||
}
|
}
|
||||||
|
else if (focused.id == "input-message") {
|
||||||
|
f=document.getElementById('file-upload');
|
||||||
|
let filename = ''
|
||||||
|
for (const file of files)
|
||||||
|
filename += file.name + ', '
|
||||||
|
filename = filename.toLowerCase().slice(0, -2)
|
||||||
|
f.files = files;
|
||||||
|
document.getElementById('filename').textContent = filename;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handle_action(type, cid, thing) {
|
function handle_action(type, cid, thing) {
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
document.onpaste = function(event) {
|
||||||
|
const files = structuredClone(event.clipboardData.files);
|
||||||
|
|
||||||
|
if (files.length > 4)
|
||||||
|
{
|
||||||
|
alert("You can't upload more than 4 files at one time!")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!files.length) return
|
||||||
|
|
||||||
|
const f = document.getElementById('file-upload');
|
||||||
|
let filename = ''
|
||||||
|
for (const file of files)
|
||||||
|
filename += file.name + ', '
|
||||||
|
filename = filename.toLowerCase().slice(0, -2)
|
||||||
|
f.files = files;
|
||||||
|
document.getElementById('filename').textContent = filename;
|
||||||
|
}
|
|
@ -23,6 +23,8 @@
|
||||||
|
|
||||||
<p class="my-3">Warrant Canary has been moved to <a href="/search/posts/?q=%22Monthly%20Website%20Stats%20Post%22&sort=new&t=all">Monthly Website Stats Posts</a>.</p>
|
<p class="my-3">Warrant Canary has been moved to <a href="/search/posts/?q=%22Monthly%20Website%20Stats%20Post%22&sort=new&t=all">Monthly Website Stats Posts</a>.</p>
|
||||||
|
|
||||||
|
<script defer src="{{'js/contact.js' | asset}}"></script>
|
||||||
|
|
||||||
{% include "modals/emoji.html" %}
|
{% include "modals/emoji.html" %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<h4>by email: {{EMAIL}}</h4>
|
<h4>by email: {{EMAIL}}</h4>
|
||||||
|
|
Loading…
Reference in New Issue