From cbf60059b8e9fdcdb06fcaa08626eaf657f98946 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Thu, 20 Feb 2014 20:29:11 +0100 Subject: [PATCH] Fix the QR. --- CHANGELOG.md | 2 ++ src/Posting/QR.coffee | 16 ++-------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a2f7b7d6..dc03c89a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +- Fix the QR breaking after a change with 4chan. + ## 3.18.0 - *2014-02-15* - Added `Image Size` setting for the catalog. diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 337ac7c59..3c1b4d3b2 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -1,4 +1,6 @@ QR = + # Add empty mimeType to avoid errors with URLs selected in Window's file dialog. + mimeTypes: ['image/jpeg', 'image/png', 'image/gif', 'application/pdf', 'application/x-shockwave-flash', ''] init: -> return if !Conf['Quick Reply'] @@ -307,20 +309,6 @@ QR = if Conf['Tab to Choose Files First'] $.add nodes.fileSubmit, nodes.status - # Allow only this board's supported files. - mimeTypes = $('ul.rules > li').textContent.trim().match(/: (.+)/)[1].toLowerCase().replace /\w+/g, (type) -> - switch type - when 'jpg' - 'image/jpeg' - when 'pdf' - 'application/pdf' - when 'swf' - 'application/x-shockwave-flash' - else - "image/#{type}" - QR.mimeTypes = mimeTypes.split ', ' - # Add empty mimeType to avoid errors with URLs selected in Window's file dialog. - QR.mimeTypes.push '' nodes.fileInput.max = $('input[name=MAX_FILE_SIZE]').value QR.spoiler = !!$ 'input[name=spoiler]'