From 4041419a3d1b450510658d744aa87a8ac4caa767 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Tue, 3 Jan 2012 22:46:56 +0100 Subject: [PATCH] Revert "Whoa, what? Fix mime-type acceptance." Dunno why I got it wrong while testing. This reverts commit ea945cc4b7a7361dad5177572b3aee53aac2b122. --- 4chan_x.user.js | 2 +- script.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index d8f980701..393a0200e 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1502,7 +1502,7 @@ $.on($('#recaptcha_challenge_field_holder'), 'DOMNodeInserted', qr.captchaNode); qr.captchaTime = Date.now(); qr.spoiler = $('.postarea label') ? '' : ''; - qr.acceptFiles = $('.rules').textContent.match(/: (.+)/)[1].replace(/\w+/g, function(type) { + qr.acceptFiles = $('.rules').textContent.match(/: (.+) /)[1].replace(/\w+/g, function(type) { switch (type) { case 'JPG': return 'image/JPEG'; diff --git a/script.coffee b/script.coffee index 2175ab9c1..72c427c9a 100644 --- a/script.coffee +++ b/script.coffee @@ -1127,7 +1127,7 @@ qr = qr.captchaTime = Date.now() qr.spoiler = if $('.postarea label') then '' else '' - qr.acceptFiles = $('.rules').textContent.match(/: (.+)/)[1].replace /\w+/g, (type) -> + qr.acceptFiles = $('.rules').textContent.match(/: (.+) /)[1].replace /\w+/g, (type) -> switch type when 'JPG' 'image/JPEG'