option: auto hide qr. fix #200
This commit is contained in:
parent
4bd116d2b3
commit
9cee5c5133
@ -100,7 +100,8 @@
|
|||||||
'Auto Noko': [true, 'Always redirect to your post'],
|
'Auto Noko': [true, 'Always redirect to your post'],
|
||||||
'Cooldown': [true, 'Prevent \'flood detected\' errors'],
|
'Cooldown': [true, 'Prevent \'flood detected\' errors'],
|
||||||
'Quick Reply': [true, 'Reply without leaving the page'],
|
'Quick Reply': [true, 'Reply without leaving the page'],
|
||||||
'Persistent QR': [false, 'Quick reply won\'t disappear after posting. Only in replies.']
|
'Persistent QR': [false, 'Quick reply won\'t disappear after posting. Only in replies.'],
|
||||||
|
'Auto Hide QR': [true, 'Automatically auto-hide the quick reply when posting']
|
||||||
},
|
},
|
||||||
Quoting: {
|
Quoting: {
|
||||||
'Quote Backlinks': [true, 'Add quote backlinks'],
|
'Quote Backlinks': [true, 'Add quote backlinks'],
|
||||||
@ -1312,7 +1313,9 @@
|
|||||||
this.submit();
|
this.submit();
|
||||||
}
|
}
|
||||||
$('#error', qr.el).textContent = '';
|
$('#error', qr.el).textContent = '';
|
||||||
qr.autohide.set();
|
if (conf['Auto Hide QR']) {
|
||||||
|
qr.autohide.set();
|
||||||
|
}
|
||||||
return qr.sage = /sage/i.test($('input[name=email]', this).value);
|
return qr.sage = /sage/i.test($('input[name=email]', this).value);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1371,7 +1374,9 @@
|
|||||||
},
|
},
|
||||||
persist: function() {
|
persist: function() {
|
||||||
qr.dialog();
|
qr.dialog();
|
||||||
return qr.autohide.set();
|
if (conf['Auto Hide QR']) {
|
||||||
|
return qr.autohide.set();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
close: function() {
|
close: function() {
|
||||||
$.rm(qr.el);
|
$.rm(qr.el);
|
||||||
@ -2443,7 +2448,9 @@
|
|||||||
}
|
}
|
||||||
if (e.keyCode === 13 && cooldown.duration) {
|
if (e.keyCode === 13 && cooldown.duration) {
|
||||||
$('#auto', qr.el).checked = true;
|
$('#auto', qr.el).checked = true;
|
||||||
return qr.autohide.set();
|
if (conf['Auto Hide QR']) {
|
||||||
|
return qr.autohide.set();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
reload: function() {
|
reload: function() {
|
||||||
|
|||||||
@ -34,6 +34,7 @@ config =
|
|||||||
'Cooldown': [true, 'Prevent \'flood detected\' errors']
|
'Cooldown': [true, 'Prevent \'flood detected\' errors']
|
||||||
'Quick Reply': [true, 'Reply without leaving the page']
|
'Quick Reply': [true, 'Reply without leaving the page']
|
||||||
'Persistent QR': [false, 'Quick reply won\'t disappear after posting. Only in replies.']
|
'Persistent QR': [false, 'Quick reply won\'t disappear after posting. Only in replies.']
|
||||||
|
'Auto Hide QR': [true, 'Automatically auto-hide the quick reply when posting']
|
||||||
Quoting:
|
Quoting:
|
||||||
'Quote Backlinks': [true, 'Add quote backlinks']
|
'Quote Backlinks': [true, 'Add quote backlinks']
|
||||||
'OP Backlinks': [false, 'Add backlinks to the OP']
|
'OP Backlinks': [false, 'Add backlinks to the OP']
|
||||||
@ -1027,7 +1028,7 @@ qr =
|
|||||||
else if isQR
|
else if isQR
|
||||||
if !e then @submit()
|
if !e then @submit()
|
||||||
$('#error', qr.el).textContent = ''
|
$('#error', qr.el).textContent = ''
|
||||||
qr.autohide.set()
|
qr.autohide.set() if conf['Auto Hide QR']
|
||||||
qr.sage = /sage/i.test $('input[name=email]', @).value
|
qr.sage = /sage/i.test $('input[name=email]', @).value
|
||||||
|
|
||||||
quote: (link) ->
|
quote: (link) ->
|
||||||
@ -1100,7 +1101,7 @@ qr =
|
|||||||
|
|
||||||
persist: ->
|
persist: ->
|
||||||
qr.dialog()
|
qr.dialog()
|
||||||
qr.autohide.set()
|
qr.autohide.set() if conf['Auto Hide QR']
|
||||||
|
|
||||||
close: ->
|
close: ->
|
||||||
$.rm qr.el
|
$.rm qr.el
|
||||||
@ -1846,7 +1847,7 @@ Recaptcha =
|
|||||||
Recaptcha.reload()
|
Recaptcha.reload()
|
||||||
if e.keyCode is 13 and cooldown.duration # press enter to enable auto-post if cooldown is still running
|
if e.keyCode is 13 and cooldown.duration # press enter to enable auto-post if cooldown is still running
|
||||||
$('#auto', qr.el).checked = true
|
$('#auto', qr.el).checked = true
|
||||||
qr.autohide.set()
|
qr.autohide.set() if conf['Auto Hide QR']
|
||||||
reload: ->
|
reload: ->
|
||||||
window.location = 'javascript:Recaptcha.reload()'
|
window.location = 'javascript:Recaptcha.reload()'
|
||||||
reloaded: (e) ->
|
reloaded: (e) ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user