uploads: fix paste to upload on firefox

master
justcool393 2022-11-13 08:16:42 -06:00
parent 9624ae2b5d
commit 994ca902ca
6 changed files with 6 additions and 6 deletions

View File

@ -264,7 +264,7 @@ function post_comment(fullname, hide){
document.onpaste = function(event) { document.onpaste = function(event) {
var focused = document.activeElement; var focused = document.activeElement;
const files = event.clipboardData.files const files = structuredClone(event.clipboardData.files);
if (files.length > 4) if (files.length > 4)
{ {

View File

@ -87,7 +87,7 @@ function updatebgselection(){
document.onpaste = function(event) { document.onpaste = function(event) {
var focused = document.activeElement; var focused = document.activeElement;
if (focused.id == 'bio-text') { if (focused.id == 'bio-text') {
const files = event.clipboardData.files const files = structuredClone(event.clipboardData.files);
if (files.length > 4) if (files.length > 4)
{ {

View File

@ -55,7 +55,7 @@ function hide_image() {
} }
document.onpaste = function(event) { document.onpaste = function(event) {
files = event.clipboardData.files files = structuredClone(event.clipboardData.files);
if (files.length > 4) if (files.length > 4)
{ {

View File

@ -74,7 +74,7 @@
<script> <script>
document.onpaste = function(event) { document.onpaste = function(event) {
files = event.clipboardData.files files = structuredClone(event.clipboardData.files);
filename = files[0] filename = files[0]

View File

@ -76,7 +76,7 @@
<script> <script>
document.onpaste = function(event) { document.onpaste = function(event) {
files = event.clipboardData.files files = structuredClone(event.clipboardData.files);
filename = files[0] filename = files[0]

View File

@ -65,7 +65,7 @@
<script> <script>
document.onpaste = function(event) { document.onpaste = function(event) {
files = event.clipboardData.files files = structuredClone(event.clipboardData.files);
filename = files[0] filename = files[0]