From 9607ecd8719a8e2aedba0dec9cf9a01585556b4a Mon Sep 17 00:00:00 2001 From: James Campos Date: Sun, 8 May 2011 23:46:37 -0700 Subject: [PATCH] ugh, compile js --- 4chan_x.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/4chan_x.js b/4chan_x.js index 491729700..2a4628f3e 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -741,7 +741,7 @@ } else { root = $('td.replyhl', thread) || thread; thumb = $('img[md5]', root); - return imgExpand.toggle(thumb); + return imgExpand.toggle(thumb.parentNode); } }, qr: function(thread, quote) { @@ -1210,8 +1210,8 @@ threading.thread(node); return $.unbind(d, 'DOMNodeInserted', threading.stopPropagation); }, - thread: function(node) { - var div, op; + op: function(node) { + var op; op = $.el('div', { className: 'op' }); @@ -1222,10 +1222,14 @@ } $.append(op, node); op.id = $('input[name]', op).name; + return op; + }, + thread: function(node) { + var div; + node = thread.op(node); if (g.REPLY) { return; } - node = op; div = $.el('div', { className: 'thread' }); @@ -1718,7 +1722,7 @@ return ui.winHeight = d.body.clientHeight; }, parse: function(req, id, threadID) { - var body, html, qp, reply, _i, _len, _ref; + var body, html, op, qp, reply, _i, _len, _ref; qp = $('#qp'); if (qp.innerHTML !== ("Loading " + id + "...")) { return; @@ -1731,8 +1735,8 @@ innerHTML: req.responseText }); if (id === threadID) { - threading.thread($('form[name=delform] > *', body)); - html = $('.op', body).innerHTML; + op = threading.op($('form[name=delform] > *', body)); + html = op.innerHTML; } else { _ref = $$('td.reply', body); for (_i = 0, _len = _ref.length; _i < _len; _i++) {