Merge pull request #285 from ihavenoface/master
Fix stubs if poster has unique ID.
This commit is contained in:
commit
d226f848f8
@ -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: "<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);
|
||||
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: "<span>[ + ]</span> " + name + trip + " (" + text + ")",
|
||||
innerHTML: "<span>[ + ]</span> " + name + uid + trip + " (" + text + ")",
|
||||
href: 'javascript:;'
|
||||
});
|
||||
$.on(a, 'click', threadHiding.cb.show);
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
master
|
||||
- noface
|
||||
Update imagelimit for mlp.
|
||||
Fix stubs if poster has unique ID.
|
||||
|
||||
2.27.1
|
||||
- Mayhem
|
||||
|
||||
@ -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: "<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
|
||||
$.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: "<span>[ + ]</span> #{name}#{trip} (#{text})"
|
||||
innerHTML: "<span>[ + ]</span> #{name}#{uid}#{trip} (#{text})"
|
||||
href: 'javascript:;'
|
||||
$.on a, 'click', threadHiding.cb.show
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user