diff --git a/4chan_x.user.js b/4chan_x.user.js index f93f53c4f..5dd0c09ff 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1427,7 +1427,7 @@ }); this.count($.get('captchas', []).length); this.load(); - return window.location = 'javascript:Recaptcha.focus_response_field=function(){}'; + return window.location = 'javascript:(function(){Recaptcha.focus_response_field=function(){}})()'; }, save: function() { var captchas, length, now, response; diff --git a/script.coffee b/script.coffee index 19dab771e..82570fb50 100644 --- a/script.coffee +++ b/script.coffee @@ -1058,7 +1058,7 @@ qr = @count $.get('captchas', []).length @load() # prevent original captcha input from being focused on reload - window.location = 'javascript:Recaptcha.focus_response_field=function(){}' + window.location = 'javascript:(function(){Recaptcha.focus_response_field=function(){}})()' save: -> return unless response = @input.value captchas = $.get 'captchas', []