Save some hundreads of ms in qr.init.
This commit is contained in:
parent
82a92c3799
commit
f77e4b35f9
@ -1265,7 +1265,7 @@
|
|||||||
|
|
||||||
qr = {
|
qr = {
|
||||||
init: function() {
|
init: function() {
|
||||||
var form, iframe, link, loadChecking, script;
|
var form, iframe, link, loadChecking;
|
||||||
if (!$.id('recaptcha_challenge_field_holder')) return;
|
if (!$.id('recaptcha_challenge_field_holder')) return;
|
||||||
if (conf['Hide Original Post Form']) {
|
if (conf['Hide Original Post Form']) {
|
||||||
link = $.el('h1', {
|
link = $.el('h1', {
|
||||||
@ -1306,11 +1306,14 @@
|
|||||||
});
|
});
|
||||||
$.add(d.head, iframe);
|
$.add(d.head, iframe);
|
||||||
}
|
}
|
||||||
script = $.el('script', {
|
setTimeout(function() {
|
||||||
textContent: 'Recaptcha.focus_response_field=function(){}'
|
var script;
|
||||||
|
script = $.el('script', {
|
||||||
|
textContent: 'Recaptcha.focus_response_field=function(){}'
|
||||||
|
});
|
||||||
|
$.add(d.head, script);
|
||||||
|
return $.rm(script);
|
||||||
});
|
});
|
||||||
$.add(d.head, script);
|
|
||||||
$.rm(script);
|
|
||||||
if (conf['Persistent QR']) {
|
if (conf['Persistent QR']) {
|
||||||
qr.dialog();
|
qr.dialog();
|
||||||
if (conf['Auto Hide QR']) qr.hide();
|
if (conf['Auto Hide QR']) qr.hide();
|
||||||
|
|||||||
@ -1036,10 +1036,12 @@ qr =
|
|||||||
$.on iframe, 'load', -> if @src isnt 'about:blank' then setTimeout loadChecking, 500, @
|
$.on iframe, 'load', -> if @src isnt 'about:blank' then setTimeout loadChecking, 500, @
|
||||||
$.add d.head, iframe
|
$.add d.head, iframe
|
||||||
|
|
||||||
# Prevent original captcha input from being focused on reload.
|
# This is extemely slow, execute is asynchronously.
|
||||||
script = $.el 'script', textContent: 'Recaptcha.focus_response_field=function(){}'
|
setTimeout ->
|
||||||
$.add d.head, script
|
# Prevent original captcha input from being focused on reload.
|
||||||
$.rm script
|
script = $.el 'script', textContent: 'Recaptcha.focus_response_field=function(){}'
|
||||||
|
$.add d.head, script
|
||||||
|
$.rm script
|
||||||
|
|
||||||
if conf['Persistent QR']
|
if conf['Persistent QR']
|
||||||
qr.dialog()
|
qr.dialog()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user