From 7b6cedd0052f038e0c63c09888d91ce3445df0c9 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Mon, 30 Apr 2012 05:02:00 +0200 Subject: [PATCH] Close #400 --- 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 1475c7552..3623f8d83 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1836,7 +1836,7 @@ }); ta.style.cssText = $.get('QR.size', ''); } - mimeTypes = $('ul.rules').firstElementChild.textContent.match(/: (.+) /)[1].toLowerCase().replace(/\w+/g, function(type) { + mimeTypes = $('ul.rules').firstElementChild.textContent.match(/: (.+)/)[1].toLowerCase().replace(/\w+/g, function(type) { switch (type) { case 'jpg': return 'image/jpeg'; diff --git a/script.coffee b/script.coffee index d15e27bcc..2d8f49d5d 100644 --- a/script.coffee +++ b/script.coffee @@ -1403,7 +1403,7 @@ QR = ta.style.cssText = $.get 'QR.size', '' # Allow only this board's supported files. - mimeTypes = $('ul.rules').firstElementChild.textContent.match(/: (.+) /)[1].toLowerCase().replace /\w+/g, (type) -> + mimeTypes = $('ul.rules').firstElementChild.textContent.match(/: (.+)/)[1].toLowerCase().replace /\w+/g, (type) -> switch type when 'jpg' 'image/jpeg'