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