Merge branch 'master' into menu
This commit is contained in:
commit
4cc2e73306
@ -1807,7 +1807,7 @@
|
|||||||
if (QR.spoiler) {
|
if (QR.spoiler) {
|
||||||
$('label', this.el).hidden = false;
|
$('label', this.el).hidden = false;
|
||||||
}
|
}
|
||||||
if (file.type === 'application/pdf') {
|
if (!/^image/.test(file.type)) {
|
||||||
this.el.style.backgroundImage = null;
|
this.el.style.backgroundImage = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2074,6 +2074,8 @@
|
|||||||
return 'image/jpeg';
|
return 'image/jpeg';
|
||||||
case 'pdf':
|
case 'pdf':
|
||||||
return 'application/pdf';
|
return 'application/pdf';
|
||||||
|
case 'swf':
|
||||||
|
return 'application/x-shockwave-flash';
|
||||||
default:
|
default:
|
||||||
return "image/" + type;
|
return "image/" + type;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1351,7 +1351,7 @@ QR =
|
|||||||
setFile: (@file) ->
|
setFile: (@file) ->
|
||||||
@el.title = "#{file.name} (#{$.bytesToString file.size})"
|
@el.title = "#{file.name} (#{$.bytesToString file.size})"
|
||||||
$('label', @el).hidden = false if QR.spoiler
|
$('label', @el).hidden = false if QR.spoiler
|
||||||
if file.type is 'application/pdf'
|
unless /^image/.test file.type
|
||||||
@el.style.backgroundImage = null
|
@el.style.backgroundImage = null
|
||||||
return
|
return
|
||||||
url = window.URL or window.webkitURL
|
url = window.URL or window.webkitURL
|
||||||
@ -1475,8 +1475,8 @@ QR =
|
|||||||
$.after $('.captchaimg', QR.el), $.el 'div',
|
$.after $('.captchaimg', QR.el), $.el 'div',
|
||||||
className: 'captchainput'
|
className: 'captchainput'
|
||||||
innerHTML: '<input title=Verification class=field autocomplete=off size=1>'
|
innerHTML: '<input title=Verification class=field autocomplete=off size=1>'
|
||||||
@img = $ '.captchaimg > img', QR.el
|
@img = $ '.captchaimg > img', QR.el
|
||||||
@input = $ '.captchainput > input', QR.el
|
@input = $ '.captchainput > input', QR.el
|
||||||
$.on @img.parentNode, 'click', @reload
|
$.on @img.parentNode, 'click', @reload
|
||||||
$.on @input, 'keydown', @keydown
|
$.on @input, 'keydown', @keydown
|
||||||
$.on @challenge, 'DOMNodeInserted', => @load()
|
$.on @challenge, 'DOMNodeInserted', => @load()
|
||||||
@ -1556,6 +1556,8 @@ QR =
|
|||||||
'image/jpeg'
|
'image/jpeg'
|
||||||
when 'pdf'
|
when 'pdf'
|
||||||
'application/pdf'
|
'application/pdf'
|
||||||
|
when 'swf'
|
||||||
|
'application/x-shockwave-flash'
|
||||||
else
|
else
|
||||||
"image/#{type}"
|
"image/#{type}"
|
||||||
QR.mimeTypes = mimeTypes.split ', '
|
QR.mimeTypes = mimeTypes.split ', '
|
||||||
@ -2547,7 +2549,6 @@ Get =
|
|||||||
]
|
]
|
||||||
{capcode} = data
|
{capcode} = data
|
||||||
if capcode isnt 'N' # 'A'dmin or 'M'od
|
if capcode isnt 'N' # 'A'dmin or 'M'od
|
||||||
# XXX not sure if this is correct for mods
|
|
||||||
$.addClass br.parentNode, if capcode is 'A' then 'capcodeAdmin' else 'capcodeMod'
|
$.addClass br.parentNode, if capcode is 'A' then 'capcodeAdmin' else 'capcodeMod'
|
||||||
$.before br, [
|
$.before br, [
|
||||||
$.tn(' '),
|
$.tn(' '),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user