diff --git a/4chan_x.user.js b/4chan_x.user.js index 48149a363..f2859efd6 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1854,7 +1854,7 @@ return "image/" + type; } }); - QR.mimeTypes = mimeTypes.split(', '); + QR.mimeTypes = mimeTypes.replace(/\s+/g, '').split(','); QR.mimeTypes.push(''); fileInput = $('[type=file]', QR.el); fileInput.max = $('[name=MAX_FILE_SIZE]').value; diff --git a/script.coffee b/script.coffee index 36db6c35b..1bec8dac8 100644 --- a/script.coffee +++ b/script.coffee @@ -1415,7 +1415,7 @@ QR = 'application/pdf' else "image/#{type}" - QR.mimeTypes = mimeTypes.split ', ' + QR.mimeTypes = mimeTypes.replace(/\s+/g, '').split ',' # Add empty mimeType to avoid errors with URLs selected in Window's file dialog. QR.mimeTypes.push '' fileInput = $ '[type=file]', QR.el