Fix mimetype checking.

Close #400

Conflicts:

	4chan_x.user.js
	script.coffee
This commit is contained in:
Nicolas Stepien 2012-04-30 05:02:00 +02:00
parent 77cc33ad75
commit 128f66c9b1
3 changed files with 3 additions and 2 deletions

View File

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

View File

@ -1,6 +1,7 @@
master
- Mayhem
Auto-GIF will not run in /gif/.
Fix QR filetype checking.
2.29.3
- Mayhem

View File

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