From 4bb6b4cf88d8dac4be66a69543873d47cdbee871 Mon Sep 17 00:00:00 2001 From: James Campos Date: Sat, 6 Aug 2011 10:37:37 -0700 Subject: [PATCH] shuffle --- 4chan_x.user.js | 6 +++--- script.coffee | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index e059fec5d..62385a572 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1230,16 +1230,16 @@ qr = { init: function() { var iframe; - g.callbacks.push(qr.node); iframe = $.el('iframe', { name: 'iframe', hidden: true }); $.append(d.body, iframe); + g.callbacks.push(qr.node); $.bind(window, 'message', qr.message); - $('#recaptcha_response_field').id = ''; $.bind($('#recaptcha_challenge_field_holder'), 'DOMNodeInserted', qr.captchaNode); - return qr.captcha = []; + qr.captcha = []; + return $('#recaptcha_response_field').id = ''; }, attach: function() { var file, files; diff --git a/script.coffee b/script.coffee index 97198d0eb..211fb83cd 100644 --- a/script.coffee +++ b/script.coffee @@ -969,20 +969,21 @@ qr = # remove file # error handling # persistent captcha + # code review init: -> g.callbacks.push qr.node + $.bind window, 'message', qr.message + $.bind $('#recaptcha_challenge_field_holder'), 'DOMNodeInserted', qr.captchaNode + qr.captcha = [] + iframe = $.el 'iframe', name: 'iframe' hidden: true $.append d.body, iframe - $.bind window, 'message', qr.message #hack - nuke id so it doesn't grab focus when reloading $('#recaptcha_response_field').id = '' - $.bind $('#recaptcha_challenge_field_holder'), 'DOMNodeInserted', qr.captchaNode - qr.captcha = [] - attach: -> $('#auto', qr.el).checked = true file = $.el 'input', type: 'file', name: 'upfile'