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', ''); 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) { switch (type) {
case 'jpg': case 'jpg':
return 'image/jpeg'; return 'image/jpeg';

View File

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

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').firstChild.textContent.match(/: (.+) /)[1].toLowerCase().replace /\w+/g, (type) -> mimeTypes = $('.rules').firstElementChild.textContent.match(/: (.+)/)[1].toLowerCase().replace /\w+/g, (type) ->
switch type switch type
when 'jpg' when 'jpg'
'image/jpeg' 'image/jpeg'