diff --git a/4chan_x.user.js b/4chan_x.user.js index bad087399..c00dc813f 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2242,8 +2242,9 @@ el = _ref2[_i]; el.tabIndex = 1; } - recaptcha = $('#recaptcha_response_field'); - return $.bind(recaptcha, 'keydown', Recaptcha.listener); + if (recaptcha = $('#recaptcha_response_field')) { + return $.bind(recaptcha, 'keydown', Recaptcha.listener); + } }, listener: function(e) { if (e.keyCode === 8 && this.value === '') { diff --git a/script.coffee b/script.coffee index 1c50c5f45..7cecaefa3 100644 --- a/script.coffee +++ b/script.coffee @@ -1701,8 +1701,8 @@ Recaptcha = #hack to tab from comment straight to recaptcha for el in $$ '#recaptcha_table a' el.tabIndex = 1 - recaptcha = $ '#recaptcha_response_field' - $.bind recaptcha, 'keydown', Recaptcha.listener + if recaptcha = $ '#recaptcha_response_field' #NoScript + $.bind recaptcha, 'keydown', Recaptcha.listener listener: (e) -> if e.keyCode is 8 and @value is '' Recaptcha.reload()