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