From fe4b037536ea6edc53e7b63e0fa6d8cc76cbe389 Mon Sep 17 00:00:00 2001 From: Kabir Sala Date: Wed, 12 Feb 2014 23:30:49 +0100 Subject: [PATCH] More fixes --- src/Posting/QR.coffee | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index b6de4ffa5..d7cabe8d6 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -270,15 +270,15 @@ QR = handleUrl: -> url = prompt("Insert an url:") - return if url == null + return if url is null <% if (type === 'crx') { %> xhr = new XMLHttpRequest(); xhr.open('GET', url, true) xhr.responseType = 'blob' xhr.onload = (e) -> if @readyState is @DONE && xhr.status is 200 - urlBlob = new Blob([this.response], {type : this.getResponseHeader('content-type')}) - return if urlBlob.type == null + urlBlob = new Blob([@response], {type : @getResponseHeader('content-type')}) + return if urlBlob.type is null unless urlBlob.type in QR.mimeTypes QR.error "Unsupported file type." urlBlob.name = url.substr(url.lastIndexOf('/')+1, url.length) @@ -328,7 +328,6 @@ QR = } return <% } %> - handleFiles: (files) -> if @ isnt QR # file input