From e5239d8947cbe17f79dc63d64c33114e6cff670f Mon Sep 17 00:00:00 2001 From: James Campos Date: Fri, 2 Sep 2011 00:39:03 -0700 Subject: [PATCH] merge QR.node into QR.init --- 4chan_x.user.js | 11 +++++------ script.coffee | 7 +++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index dea3b5598..eec097668 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1227,7 +1227,11 @@ QR = { init: function() { var holder; - g.callbacks.push(QR.node); + g.callbacks.push(function(root) { + var quote; + quote = $('a.quotejs + a', root); + return $.bind(quote, 'click', QR.quote); + }); $.append(d.body, $.el('iframe', { name: 'iframe' })); @@ -1275,11 +1279,6 @@ $.rm(QR.el); return QR.el = null; }, - node: function(root) { - var quote; - quote = $('a.quotejs + a', root); - return $.bind(quote, 'click', QR.quote); - }, dialog: function(text) { var el, l, ta; if (text == null) { diff --git a/script.coffee b/script.coffee index f912349ad..5425068be 100644 --- a/script.coffee +++ b/script.coffee @@ -963,7 +963,9 @@ cooldown = QR = init: -> - g.callbacks.push QR.node + g.callbacks.push (root) -> + quote = $ 'a.quotejs + a', root + $.bind quote, 'click', QR.quote $.append d.body, $.el 'iframe', name: 'iframe' $.bind window, 'message', QR.receive @@ -998,9 +1000,6 @@ QR = close: -> $.rm QR.el QR.el = null - node: (root) -> - quote = $ 'a.quotejs + a', root - $.bind quote, 'click', QR.quote dialog: (text='') -> QR.el = el = ui.dialog 'qr', top: '0', left: '0', " X