From dcd14c9989a5427b0d9bd9e6f7165d518490aa99 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Tue, 3 Jan 2012 22:19:22 +0100 Subject: [PATCH] Last mimetype match fix fix, remove that trailing space. --- 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 7762539df..2d377cac8 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1311,7 +1311,7 @@ } threads = ""; } - mimeTypes = $('.rules').textContent.toLowerCase().match(/: (.+)/)[1].replace(/\w+/g, function(type) { + mimeTypes = $('.rules').textContent.toLowerCase().match(/: (.+) /)[1].replace(/\w+/g, function(type) { switch (type) { case 'jpg': return 'image/jpeg'; diff --git a/script.coffee b/script.coffee index c1736cbe2..06b08bf91 100644 --- a/script.coffee +++ b/script.coffee @@ -967,7 +967,7 @@ qr = threads += "" threads = "" # chose only supported files - mimeTypes = $('.rules').textContent.toLowerCase().match(/: (.+)/)[1].replace /\w+/g, (type) -> + mimeTypes = $('.rules').textContent.toLowerCase().match(/: (.+) /)[1].replace /\w+/g, (type) -> switch type when 'jpg' 'image/jpeg'