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'