From a1a4caa06d9d67268364fdc79f28dee5f5524855 Mon Sep 17 00:00:00 2001 From: No Face Date: Thu, 23 Feb 2012 23:20:38 +0100 Subject: [PATCH] Fix stubs if poster has unique ID. --- 4chan_x.user.js | 5 +++-- script.coffee | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 96fe9a2cf..a679ee75e 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -895,16 +895,17 @@ return $.set("hiddenReplies/" + g.BOARD + "/", g.hiddenReplies); }, hideHide: function(reply) { - var div, name, table, trip, _ref; + var div, name, table, trip, uid, _ref; table = reply.parentNode.parentNode.parentNode; if (table.hidden) return; table.hidden = true; if (conf['Show Stubs']) { name = $('.commentpostername', reply).textContent; + uid = $('.posteruid', reply).textContent; trip = ((_ref = $('.postertrip', reply)) != null ? _ref.textContent : void 0) || ''; div = $.el('div', { className: 'stub', - innerHTML: "[ + ] " + name + " " + trip + "" + innerHTML: "[ + ] " + name + " " + uid + " " + trip + "" }); $.on($('a', div), 'click', replyHiding.cb.show); return $.before(table, div); diff --git a/script.coffee b/script.coffee index 23d9f3d27..d869ff73e 100644 --- a/script.coffee +++ b/script.coffee @@ -746,11 +746,12 @@ replyHiding = if conf['Show Stubs'] name = $('.commentpostername', reply).textContent + uid = $('.posteruid', reply).textContent trip = $('.postertrip', reply)?.textContent or '' div = $.el 'div', className: 'stub' - innerHTML: "[ + ] #{name} #{trip}" + innerHTML: "[ + ] #{name} #{uid} #{trip}" $.on $('a', div), 'click', replyHiding.cb.show $.before table, div