From a5b2e1d2650ac68915d6eb1927f90243e33f4cbf Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sat, 21 Jan 2012 22:36:32 +0100 Subject: [PATCH] Firefox fix. --- 4chan_x.user.js | 2 +- script.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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', []