diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index b4a008c45..cb70f416b 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -6302,7 +6302,7 @@ return $.addClass(QR.nodes.el, 'dump'); }, handleBlob: function(urlBlob, header, url) { - var blob, end, endnl, endsc, mime, name, name_end, name_start, start, _ref; + var blob, end, endnl, endsc, mime, name, name_end, name_start, start; name = url.substr(url.lastIndexOf('/') + 1, url.length); start = header.indexOf("Content-Type: ") + 14; endsc = header.substr(start, header.length).indexOf(";"); @@ -6324,9 +6324,6 @@ if (blob.type === null) { return QR.error("Unsupported file type."); } - if (_ref = blob.type, __indexOf.call(QR.mimeTypes, _ref) < 0) { - return QR.error("Unsupported file type."); - } return QR.handleFiles([blob]); }, handleUrl: function() { diff --git a/builds/crx/script.js b/builds/crx/script.js index acfc2a066..2e039cdac 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -6366,7 +6366,7 @@ return $.addClass(QR.nodes.el, 'dump'); }, handleBlob: function(urlBlob, header, url) { - var blob, end, endnl, endsc, mime, name, name_end, name_start, start, _ref; + var blob, end, endnl, endsc, mime, name, name_end, name_start, start; name = url.substr(url.lastIndexOf('/') + 1, url.length); start = header.indexOf("Content-Type: ") + 14; endsc = header.substr(start, header.length).indexOf(";"); @@ -6388,9 +6388,6 @@ if (blob.type === null) { return QR.error("Unsupported file type."); } - if (_ref = blob.type, __indexOf.call(QR.mimeTypes, _ref) < 0) { - return QR.error("Unsupported file type."); - } return QR.handleFiles([blob]); }, handleUrl: function() { diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 66977c6ef..34b885e1e 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -303,13 +303,11 @@ QR = blob.name = url.substr(url.lastIndexOf('/')+1, url.length) name_start = header.indexOf('name="') + 6 if (name_start - 6 != -1) - name_end = header.substr(name_start, header.length).indexOf('"') + name_end = header.substr(name_start, header.length).indexOf('"') blob.name = header.substr(name_start, name_end) return if blob.type is null QR.error "Unsupported file type." - return unless blob.type in QR.mimeTypes - QR.error "Unsupported file type." QR.handleFiles([blob]) handleUrl: ->