From 8d4eff231b7df1fa56260ea57a4c1c471d68095d Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Thu, 12 May 2011 13:17:00 +0200 Subject: [PATCH] Uh oh, so that's simpler and actually possible. --- 4chan_x.js | 9 +++------ script.coffee | 4 ++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/4chan_x.js b/4chan_x.js index f42b645bc..8c24509ef 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -1582,12 +1582,9 @@ }, cb: { node: function(root) { - var name, trip, _i, _len, _ref; - _ref = $$('span.postername, span.commentpostername', root); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - name = _ref[_i]; - name.textContent = 'Anonymous'; - } + var name, trip; + name = $('span.commentpostername, span.postername', root); + name.textContent = 'Anonymous'; if (trip = $('span.postertrip', root)) { if (trip.parentNode.nodeName === 'A') { return $.remove(trip.parentNode); diff --git a/script.coffee b/script.coffee index 3583221bb..cf648af04 100644 --- a/script.coffee +++ b/script.coffee @@ -1290,8 +1290,8 @@ anonymize = g.callbacks.push anonymize.cb.node cb: node: (root) -> - for name in $$ 'span.postername, span.commentpostername', root - name.textContent = 'Anonymous' + name = $ 'span.commentpostername, span.postername', root + name.textContent = 'Anonymous' if trip = $ 'span.postertrip', root if trip.parentNode.nodeName is 'A' $.remove trip.parentNode