This commit is contained in:
Nicolas Stepien 2012-05-07 09:48:55 +02:00
parent 05a0a7f698
commit 3f3a3c5b9e
2 changed files with 2 additions and 2 deletions

View File

@ -1841,7 +1841,7 @@
}); });
ta.style.cssText = $.get('QR.size', ''); ta.style.cssText = $.get('QR.size', '');
} }
mimeTypes = $('.rules').firstElementChild.textContent.match(/: (.+)/)[1].toLowerCase().replace(/\w+/g, function(type) { mimeTypes = $('.rules').firstElementChild.textContent.trim().match(/: (.+)/)[1].toLowerCase().replace(/\w+/g, function(type) {
switch (type) { switch (type) {
case 'jpg': case 'jpg':
return 'image/jpeg'; return 'image/jpeg';

View File

@ -1405,7 +1405,7 @@ QR =
ta.style.cssText = $.get 'QR.size', '' ta.style.cssText = $.get 'QR.size', ''
# Allow only this board's supported files. # Allow only this board's supported files.
mimeTypes = $('.rules').firstElementChild.textContent.match(/: (.+)/)[1].toLowerCase().replace /\w+/g, (type) -> mimeTypes = $('.rules').firstElementChild.textContent.trim().match(/: (.+)/)[1].toLowerCase().replace /\w+/g, (type) ->
switch type switch type
when 'jpg' when 'jpg'
'image/jpeg' 'image/jpeg'