Fix the QR.

This commit is contained in:
Mayhem 2014-02-20 20:29:11 +01:00
parent 621a3e83c1
commit cbf60059b8
2 changed files with 4 additions and 14 deletions

View File

@ -1,3 +1,5 @@
- Fix the QR breaking after a change with 4chan.
## 3.18.0 - *2014-02-15*
- Added `Image Size` setting for the catalog.

View File

@ -1,4 +1,6 @@
QR =
# Add empty mimeType to avoid errors with URLs selected in Window's file dialog.
mimeTypes: ['image/jpeg', 'image/png', 'image/gif', 'application/pdf', 'application/x-shockwave-flash', '']
init: ->
return if !Conf['Quick Reply']
@ -307,20 +309,6 @@ QR =
if Conf['Tab to Choose Files First']
$.add nodes.fileSubmit, nodes.status
# Allow only this board's supported files.
mimeTypes = $('ul.rules > li').textContent.trim().match(/: (.+)/)[1].toLowerCase().replace /\w+/g, (type) ->
switch type
when 'jpg'
'image/jpeg'
when 'pdf'
'application/pdf'
when 'swf'
'application/x-shockwave-flash'
else
"image/#{type}"
QR.mimeTypes = mimeTypes.split ', '
# Add empty mimeType to avoid errors with URLs selected in Window's file dialog.
QR.mimeTypes.push ''
nodes.fileInput.max = $('input[name=MAX_FILE_SIZE]').value
QR.spoiler = !!$ 'input[name=spoiler]'