From 9c6c8f20bb74bf15009350751e591d4104d7d508 Mon Sep 17 00:00:00 2001 From: ahodesuka Date: Mon, 7 May 2012 00:38:49 -0500 Subject: [PATCH] Fix mimetypes on certain boards (/w/). --- 4chan_x.user.js | 2 +- script.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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