diff --git a/4chan_x.user.js b/4chan_x.user.js index f7a873007..ff94a0186 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1210,7 +1210,7 @@ return cooldown.interval = window.setInterval(cooldown.cb, 1000); }, cb: function() { - var submit, submits, _i, _j, _len, _len2, _ref, _results; + var submit, submits, _i, _j, _len, _len2, _results; cooldown.duration--; submits = $$('#com_submit'); if (cooldown.duration) { @@ -1227,7 +1227,7 @@ submit.disabled = false; submit.value = 'Submit'; } - if ((_ref = $('#auto', qr.el)) != null ? _ref.checked : void 0) { + if (qr.el && $('#auto', qr.el).checked) { return qr.submit.call($('form', qr.el)); } } diff --git a/script.coffee b/script.coffee index 9d5a0355e..6515914a0 100644 --- a/script.coffee +++ b/script.coffee @@ -961,7 +961,7 @@ cooldown = for submit in submits submit.disabled = false submit.value = 'Submit' - if $('#auto', qr.el)?.checked + if qr.el and $('#auto', qr.el).checked qr.submit.call $ 'form', qr.el qr =