From 9c117983081590a94676b0ab002e00a282d4c444 Mon Sep 17 00:00:00 2001 From: Brandon Date: Wed, 2 Apr 2014 17:53:39 -0700 Subject: [PATCH] move that where it belongs Conflicts: builds/4chan-X.user.js builds/crx/script.js --- builds/4chan-X.user.js | 9 +++++---- builds/crx/script.js | 9 +++++---- src/Posting/QR.coffee | 6 ++++-- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index bf0efbde9..6555eda1d 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -6354,7 +6354,11 @@ QR.cleanNotifications(); for (_i = 0, _len = files.length; _i < _len; _i++) { file = files[_i]; - QR.checkDimensions(file, isSingle, max); + if (file.type === 'application/x-shockwave-flash') { + QR.handleFile(file, isSingle, max); + } else { + QR.checkDimensions(file, isSingle, max); + } } if (!isSingle) { return $.addClass(QR.nodes.el, 'dump'); @@ -6362,9 +6366,6 @@ }, checkDimensions: function(file, isSingle, max) { var img; - if (file.type === 'application/x-shockwave-flash') { - return QR.handleFile(file, isSingle, max); - } img = new Image(); img.onload = (function(_this) { return function() { diff --git a/builds/crx/script.js b/builds/crx/script.js index ecb3f514f..24382926d 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -6410,7 +6410,11 @@ QR.cleanNotifications(); for (_i = 0, _len = files.length; _i < _len; _i++) { file = files[_i]; - QR.checkDimensions(file, isSingle, max); + if (file.type === 'application/x-shockwave-flash') { + QR.handleFile(file, isSingle, max); + } else { + QR.checkDimensions(file, isSingle, max); + } } if (!isSingle) { return $.addClass(QR.nodes.el, 'dump'); @@ -6418,9 +6422,6 @@ }, checkDimensions: function(file, isSingle, max) { var img; - if (file.type === 'application/x-shockwave-flash') { - return QR.handleFile(file, isSingle, max); - } img = new Image(); img.onload = (function(_this) { return function() { diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index fad8f05e7..7c80fcb59 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -368,11 +368,13 @@ QR = isSingle = files.length is 1 QR.cleanNotifications() for file in files - QR.checkDimensions file, isSingle, max + if file.type is 'application/x-shockwave-flash' + QR.handleFile(file, isSingle, max) + else + QR.checkDimensions file, isSingle, max $.addClass QR.nodes.el, 'dump' unless isSingle checkDimensions: (file, isSingle, max) -> - return QR.handleFile(file, isSingle, max) if file.type is 'application/x-shockwave-flash' img = new Image() img.onload = => {height, width} = img