From 0d34429ee07e634f760cda41681db2940af55059 Mon Sep 17 00:00:00 2001 From: Brandon Date: Wed, 2 Apr 2014 17:33:12 -0700 Subject: [PATCH] fix uploading swfs on /f/ Conflicts: LICENSE builds/4chan-X.user.js builds/crx/script.js --- builds/4chan-X.user.js | 3 +++ builds/crx/script.js | 3 +++ src/Posting/QR.coffee | 1 + 3 files changed, 7 insertions(+) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 5da9402c1..bf0efbde9 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -6362,6 +6362,9 @@ }, 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 9b63ae070..ecb3f514f 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -6418,6 +6418,9 @@ }, 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 40bc1d30e..fad8f05e7 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -372,6 +372,7 @@ QR = $.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