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);
|
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, _ref2;
|
||||||
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;
|
||||||
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', {
|
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);
|
||||||
@ -2400,7 +2401,7 @@
|
|||||||
return $.set("hiddenThreads/" + g.BOARD + "/", hiddenThreads);
|
return $.set("hiddenThreads/" + g.BOARD + "/", hiddenThreads);
|
||||||
},
|
},
|
||||||
hideHide: function(thread) {
|
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 (conf['Show Stubs']) {
|
||||||
if (/stub/.test(thread.className)) return;
|
if (/stub/.test(thread.className)) return;
|
||||||
if (span = $('.omittedposts', thread)) {
|
if (span = $('.omittedposts', thread)) {
|
||||||
@ -2411,9 +2412,10 @@
|
|||||||
num += $$('table', thread).length;
|
num += $$('table', thread).length;
|
||||||
text = num === 1 ? "1 reply" : "" + num + " replies";
|
text = num === 1 ? "1 reply" : "" + num + " replies";
|
||||||
name = $('.postername', thread).textContent;
|
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', {
|
a = $.el('a', {
|
||||||
innerHTML: "<span>[ + ]</span> " + name + trip + " (" + text + ")",
|
innerHTML: "<span>[ + ]</span> " + name + uid + trip + " (" + text + ")",
|
||||||
href: 'javascript:;'
|
href: 'javascript:;'
|
||||||
});
|
});
|
||||||
$.on(a, 'click', threadHiding.cb.show);
|
$.on(a, 'click', threadHiding.cb.show);
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
master
|
master
|
||||||
- noface
|
- noface
|
||||||
Update imagelimit for mlp.
|
Update imagelimit for mlp.
|
||||||
|
Fix stubs if poster has unique ID.
|
||||||
|
|
||||||
2.27.1
|
2.27.1
|
||||||
- Mayhem
|
- Mayhem
|
||||||
|
|||||||
@ -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 or ''
|
||||||
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
|
||||||
|
|
||||||
@ -1973,10 +1974,11 @@ threadHiding =
|
|||||||
num += $$('table', thread).length
|
num += $$('table', thread).length
|
||||||
text = if num is 1 then "1 reply" else "#{num} replies"
|
text = if num is 1 then "1 reply" else "#{num} replies"
|
||||||
name = $('.postername', thread).textContent
|
name = $('.postername', thread).textContent
|
||||||
|
uid = $('.posteruid', thread)?.textContent or ''
|
||||||
trip = $('.postername + .postertrip', thread)?.textContent or ''
|
trip = $('.postername + .postertrip', thread)?.textContent or ''
|
||||||
|
|
||||||
a = $.el 'a',
|
a = $.el 'a',
|
||||||
innerHTML: "<span>[ + ]</span> #{name}#{trip} (#{text})"
|
innerHTML: "<span>[ + ]</span> #{name}#{uid}#{trip} (#{text})"
|
||||||
href: 'javascript:;'
|
href: 'javascript:;'
|
||||||
$.on a, 'click', threadHiding.cb.show
|
$.on a, 'click', threadHiding.cb.show
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user