Fix history issues on Chrome, it apparently doesn't like void() in the window.location. Close #241.
This commit is contained in:
parent
342aef9e3a
commit
164ebe23d1
@ -1208,7 +1208,7 @@
|
||||
|
||||
qr = {
|
||||
init: function() {
|
||||
var form, iframe, link, loadChecking;
|
||||
var form, iframe, link, loadChecking, script;
|
||||
if (!$.id('recaptcha_challenge_field_holder')) return;
|
||||
if (conf['Hide Original Post Form']) {
|
||||
link = $.el('h1', {
|
||||
@ -1250,7 +1250,11 @@
|
||||
});
|
||||
$.add(d.body, iframe);
|
||||
}
|
||||
window.location = 'javascript:void(Recaptcha.focus_response_field=function(){})';
|
||||
script = $.el('script', {
|
||||
textContent: 'Recaptcha.focus_response_field=function(){}'
|
||||
});
|
||||
$.add(d.head, script);
|
||||
$.rm(script);
|
||||
if (conf['Persistent QR']) {
|
||||
qr.dialog();
|
||||
if (conf['Auto Hide QR']) qr.hide();
|
||||
|
||||
@ -917,7 +917,10 @@ qr =
|
||||
$.add d.body, iframe
|
||||
|
||||
# Prevent original captcha input from being focused on reload.
|
||||
window.location = 'javascript:void(Recaptcha.focus_response_field=function(){})'
|
||||
script = $.el 'script', textContent: 'Recaptcha.focus_response_field=function(){}'
|
||||
$.add d.head, script
|
||||
$.rm script
|
||||
|
||||
if conf['Persistent QR']
|
||||
qr.dialog()
|
||||
qr.hide() if conf['Auto Hide QR']
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user