diff --git a/4chan_x.user.js b/4chan_x.user.js index 795cd2c4c..d6c6e9641 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2700,14 +2700,17 @@ return Main.callbacks.push(this.node); }, node: function(post) { - var name, node; + var name, parent, trip; if (post.isInlined && !post.isCrosspost) { return; } name = $('.name', post.el); name.textContent = 'Anonymous'; - if (node = name.nextElementSibling) { - return $.rm(node); + if ((trip = name.nextElementSibling) && trip.className === 'postertrip') { + $.rm(trip); + } + if ((parent = name.parentNode).className === 'useremail' && !/^sage$/i.test(parent.pathname)) { + return $.replace(parent, name); } } }; diff --git a/script.coffee b/script.coffee index bd286c202..c2e59ae43 100644 --- a/script.coffee +++ b/script.coffee @@ -2149,8 +2149,10 @@ Anonymize = return if post.isInlined and not post.isCrosspost name = $ '.name', post.el name.textContent = 'Anonymous' - if node = name.nextElementSibling - $.rm node + if (trip = name.nextElementSibling) and trip.className is 'postertrip' + $.rm trip + if (parent = name.parentNode).className is 'useremail' and not /^sage$/i.test parent.pathname + $.replace parent, name Sauce = init: -> @@ -2677,7 +2679,6 @@ Unread = Unread.foresee.splice index, 1 return {el} = post - # new HTML ??? return if el.hidden or /\bop\b/.test(post.class) or post.isInlined count = Unread.replies.push el Unread.update count is 1