From 5ed6057b501ba0391edea066b1f04242bf6ed9ab Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sun, 9 Oct 2011 23:32:33 +0200 Subject: [PATCH] Haha oh woaw, -1 for. --- 4chan_x.user.js | 20 ++++++++------------ script.coffee | 7 +++---- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 2bcda0c2a..9f08a38c5 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3002,7 +3002,7 @@ }; Main = { init: function() { - var callback, cutoff, hiddenThreads, id, lastChecked, now, op, table, timestamp, tzOffset, _i, _j, _k, _l, _len, _len2, _len3, _len4, _ref, _ref2, _ref3, _ref4, _ref5; + var callback, cutoff, hiddenThreads, id, lastChecked, now, op, table, timestamp, tzOffset, _i, _j, _k, _len, _len2, _len3, _ref, _ref2, _ref3, _ref4; $.unbind(document, 'DOMContentLoaded', Main.init); if (location.hostname === 'sys.4chan.org') { QR.sys(); @@ -3131,21 +3131,17 @@ expandComment.init(); } } - _ref2 = $$('div.op'); + _ref2 = g.callbacks; for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - op = _ref2[_i]; - _ref3 = g.callbacks; + callback = _ref2[_i]; + _ref3 = $$('.op'); for (_j = 0, _len2 = _ref3.length; _j < _len2; _j++) { - callback = _ref3[_j]; + op = _ref3[_j]; callback(op); } - } - _ref4 = $$('a + table'); - for (_k = 0, _len3 = _ref4.length; _k < _len3; _k++) { - table = _ref4[_k]; - _ref5 = g.callbacks; - for (_l = 0, _len4 = _ref5.length; _l < _len4; _l++) { - callback = _ref5[_l]; + _ref4 = $$('a + table'); + for (_k = 0, _len3 = _ref4.length; _k < _len3; _k++) { + table = _ref4[_k]; callback(table); } } diff --git a/script.coffee b/script.coffee index f435e1110..c341edc46 100644 --- a/script.coffee +++ b/script.coffee @@ -2369,11 +2369,10 @@ Main = if conf['Comment Expansion'] expandComment.init() - for op in $$ 'div.op' - for callback in g.callbacks + for callback in g.callbacks + for op in $$ '.op' callback op - for table in $$ 'a + table' - for callback in g.callbacks + for table in $$ 'a + table' callback table $.bind $('form[name=delform]'), 'DOMNodeInserted', nodeInserted options.init()