diff --git a/4chan_x.user.js b/4chan_x.user.js index 2d7e48487..5e8437bf1 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2701,7 +2701,7 @@ }; main = { init: function() { - var DAY, callback, cutoff, form, hiddenThreads, id, lastChecked, now, op, pathname, table, temp, timestamp, tzOffset, _i, _j, _k, _l, _len, _len2, _len3, _len4, _ref2, _ref3, _ref4, _ref5, _ref6; + var DAY, callback, canPost, cutoff, form, hiddenThreads, id, lastChecked, now, op, pathname, table, temp, timestamp, tzOffset, _i, _j, _k, _l, _len, _len2, _len3, _len4, _ref2, _ref3, _ref4, _ref5, _ref6; pathname = location.pathname.substring(1).split('/'); g.BOARD = pathname[0], temp = pathname[1]; if (temp === 'res') { @@ -2753,7 +2753,7 @@ $.setValue('lastChecked', now); } $.addStyle(main.css); - if (form = $('form[name=post]')) { + if ((form = $('form[name=post]')) && (canPost = !!$('#recaptcha_response_field'))) { Recaptcha.init(); $.bind(form, 'submit', qr.submit); } @@ -2791,7 +2791,7 @@ if (conf['Reply Hiding']) { replyHiding.init(); } - if (conf['Quick Reply'] && form) { + if (canPost && conf['Quick Reply']) { qr.init(); } if (conf['Report Button']) { diff --git a/script.coffee b/script.coffee index 4f808b102..ebae9d5b2 100644 --- a/script.coffee +++ b/script.coffee @@ -2144,7 +2144,7 @@ main = $.addStyle main.css - if form = $ 'form[name=post]' + if (form = $ 'form[name=post]') and canPost = !!$ '#recaptcha_response_field' Recaptcha.init() $.bind form, 'submit', qr.submit @@ -2186,7 +2186,7 @@ main = if conf['Reply Hiding'] replyHiding.init() - if conf['Quick Reply'] and form + if canPost and conf['Quick Reply'] qr.init() if conf['Report Button']