Fix stubs if poster has unique ID.

This commit is contained in:
No Face 2012-02-23 23:20:38 +01:00
parent 0730e2b099
commit a1a4caa06d
2 changed files with 5 additions and 3 deletions

View File

@ -895,16 +895,17 @@
return $.set("hiddenReplies/" + g.BOARD + "/", g.hiddenReplies); return $.set("hiddenReplies/" + g.BOARD + "/", g.hiddenReplies);
}, },
hideHide: function(reply) { hideHide: function(reply) {
var div, name, table, trip, _ref; var div, name, table, trip, uid, _ref;
table = reply.parentNode.parentNode.parentNode; table = reply.parentNode.parentNode.parentNode;
if (table.hidden) return; if (table.hidden) return;
table.hidden = true; table.hidden = true;
if (conf['Show Stubs']) { if (conf['Show Stubs']) {
name = $('.commentpostername', reply).textContent; name = $('.commentpostername', reply).textContent;
uid = $('.posteruid', reply).textContent;
trip = ((_ref = $('.postertrip', reply)) != null ? _ref.textContent : void 0) || ''; trip = ((_ref = $('.postertrip', reply)) != null ? _ref.textContent : void 0) || '';
div = $.el('div', { div = $.el('div', {
className: 'stub', className: 'stub',
innerHTML: "<a href=javascript:;><span>[ + ]</span> " + name + " " + trip + "</a>" innerHTML: "<a href=javascript:;><span>[ + ]</span> " + name + " " + uid + " " + trip + "</a>"
}); });
$.on($('a', div), 'click', replyHiding.cb.show); $.on($('a', div), 'click', replyHiding.cb.show);
return $.before(table, div); return $.before(table, div);

View File

@ -746,11 +746,12 @@ replyHiding =
if conf['Show Stubs'] if conf['Show Stubs']
name = $('.commentpostername', reply).textContent name = $('.commentpostername', reply).textContent
uid = $('.posteruid', reply).textContent
trip = $('.postertrip', reply)?.textContent or '' trip = $('.postertrip', reply)?.textContent or ''
div = $.el 'div', div = $.el 'div',
className: 'stub' className: 'stub'
innerHTML: "<a href=javascript:;><span>[ + ]</span> #{name} #{trip}</a>" innerHTML: "<a href=javascript:;><span>[ + ]</span> #{name} #{uid} #{trip}</a>"
$.on $('a', div), 'click', replyHiding.cb.show $.on $('a', div), 'click', replyHiding.cb.show
$.before table, div $.before table, div