From 1cec99ba8fda196680c1fdd99a27d19d87119997 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Tue, 6 Mar 2012 15:14:16 +0100 Subject: [PATCH] Fix #282. --- 4chan_x.user.js | 1 + script.coffee | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 40e4328dd..d16cc2cbf 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1795,6 +1795,7 @@ } }); qr.mimeTypes = mimeTypes.split(', '); + qr.mimeTypes.push(''); fileInput = $('[type=file]', qr.el); fileInput.max = $('[name=MAX_FILE_SIZE]').value; fileInput.accept = mimeTypes; diff --git a/script.coffee b/script.coffee index d60d37e7c..72daadcfd 100644 --- a/script.coffee +++ b/script.coffee @@ -1456,7 +1456,9 @@ qr = 'application/pdf' else "image/#{type}" - qr.mimeTypes = mimeTypes.split ', ' + qr.mimeTypes = mimeTypes.split ', ' + # Add empty mimeType to avoid errors with URLs selected in Window's file dialog. + qr.mimeTypes.push '' fileInput = $ '[type=file]', qr.el fileInput.max = $('[name=MAX_FILE_SIZE]').value fileInput.accept = mimeTypes