diff --git a/4chan_x.js b/4chan_x.js index f0ae16fea..aeb9db20d 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -1139,7 +1139,7 @@ } }, dialog: function(link) { - var MAX_FILE_SIZE, THREAD_ID, challenge, dialog, el, html, mail, name, pass, spoiler, src; + var MAX_FILE_SIZE, THREAD_ID, challenge, dialog, html, mail, name, pass, spoiler, src; MAX_FILE_SIZE = $('input[name="MAX_FILE_SIZE"]').value; THREAD_ID = g.THREAD_ID || link.pathname.split('/').pop(); challenge = $('input[name=recaptcha_challenge_field]').value; @@ -1155,8 +1155,7 @@ $.bind($('input[name=name]', dialog), 'mousedown', function(e) { return e.stopPropagation(); }); - el = $('#autohide', dialog); - $.bind(el, 'click', qr.cb.autohide); + $.bind($('#autohide', dialog), 'click', qr.cb.autohide); if ($('.postarea label')) { spoiler = $.el('label', { innerHTML: " [Spoiler Image?]" diff --git a/script.coffee b/script.coffee index 736260931..11bca4c56 100644 --- a/script.coffee +++ b/script.coffee @@ -928,8 +928,7 @@ qr = dialog = ui.dialog 'qr', top: '0px', left: '0px', html $.bind $('input[name=name]', dialog), 'mousedown', (e) -> e.stopPropagation() - el = $ '#autohide', dialog - $.bind el, 'click', qr.cb.autohide + $.bind $('#autohide', dialog), 'click', qr.cb.autohide if $ '.postarea label' spoiler = $.el 'label',