diff --git a/4chan_x.user.js b/4chan_x.user.js
index 8199a2ef1..347f7b149 100644
--- a/4chan_x.user.js
+++ b/4chan_x.user.js
@@ -896,16 +896,17 @@
return $.set("hiddenReplies/" + g.BOARD + "/", g.hiddenReplies);
},
hideHide: function(reply) {
- var div, name, table, trip, _ref;
+ var div, name, table, trip, uid, _ref, _ref2;
table = reply.parentNode.parentNode.parentNode;
if (table.hidden) return;
table.hidden = true;
if (conf['Show Stubs']) {
name = $('.commentpostername', reply).textContent;
- trip = ((_ref = $('.postertrip', reply)) != null ? _ref.textContent : void 0) || '';
+ uid = ((_ref = $('.posteruid', reply)) != null ? _ref.textContent : void 0) || '';
+ trip = ((_ref2 = $('.postertrip', reply)) != null ? _ref2.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);
@@ -2400,7 +2401,7 @@
return $.set("hiddenThreads/" + g.BOARD + "/", hiddenThreads);
},
hideHide: function(thread) {
- var a, div, name, num, span, text, trip, _ref;
+ var a, div, name, num, span, text, trip, uid, _ref, _ref2;
if (conf['Show Stubs']) {
if (/stub/.test(thread.className)) return;
if (span = $('.omittedposts', thread)) {
@@ -2411,9 +2412,10 @@
num += $$('table', thread).length;
text = num === 1 ? "1 reply" : "" + num + " replies";
name = $('.postername', thread).textContent;
- trip = ((_ref = $('.postername + .postertrip', thread)) != null ? _ref.textContent : void 0) || '';
+ uid = ((_ref = $('.posteruid', thread)) != null ? _ref.textContent : void 0) || '';
+ trip = ((_ref2 = $('.postername + .postertrip', thread)) != null ? _ref2.textContent : void 0) || '';
a = $.el('a', {
- innerHTML: "[ + ] " + name + trip + " (" + text + ")",
+ innerHTML: "[ + ] " + name + uid + trip + " (" + text + ")",
href: 'javascript:;'
});
$.on(a, 'click', threadHiding.cb.show);
diff --git a/changelog b/changelog
index 3d16fc0b2..efc106bf1 100644
--- a/changelog
+++ b/changelog
@@ -1,6 +1,7 @@
master
- noface
Update imagelimit for mlp.
+ Fix stubs if poster has unique ID.
2.27.1
- Mayhem
diff --git a/script.coffee b/script.coffee
index 38bfccb71..126fb46c0 100644
--- a/script.coffee
+++ b/script.coffee
@@ -746,11 +746,12 @@ replyHiding =
if conf['Show Stubs']
name = $('.commentpostername', reply).textContent
+ uid = $('.posteruid', reply)?.textContent or ''
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
@@ -1973,10 +1974,11 @@ threadHiding =
num += $$('table', thread).length
text = if num is 1 then "1 reply" else "#{num} replies"
name = $('.postername', thread).textContent
+ uid = $('.posteruid', thread)?.textContent or ''
trip = $('.postername + .postertrip', thread)?.textContent or ''
a = $.el 'a',
- innerHTML: "[ + ] #{name}#{trip} (#{text})"
+ innerHTML: "[ + ] #{name}#{uid}#{trip} (#{text})"
href: 'javascript:;'
$.on a, 'click', threadHiding.cb.show