From 7d9172d55d68bab89dedc74dc52cdcf5aa08e6b7 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sat, 23 Feb 2013 01:23:51 +0100 Subject: [PATCH] Un-expanding stickies only have 1 replies on the index. --- 4chan_x.user.js | 22 +++++++++++++--------- src/features.coffee | 4 +++- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 980701f30..65769b4d9 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -4835,15 +4835,19 @@ a.textContent = text.replace('-', '+'); ExpandComment.contract(thread.OP); num = (function() { - switch (g.BOARD) { - case 'b': - case 'vg': - case 'q': - return 3; - case 't': - return 1; - default: - return 5; + if (thread.isSticky) { + return 1; + } else { + switch (g.BOARD) { + case 'b': + case 'vg': + case 'q': + return 3; + case 't': + return 1; + default: + return 5; + } } })(); replies = $$('.thread > .replyContainer', threadRoot).slice(0, -num); diff --git a/src/features.coffee b/src/features.coffee index 6aaf18f0d..82beb4c4e 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -3212,7 +3212,9 @@ ExpandThread = a.textContent = text.replace '-', '+' ExpandComment.contract thread.OP #goddamit moot - num = switch g.BOARD + num = if thread.isSticky + 1 + else switch g.BOARD # XXX boards config when 'b', 'vg', 'q' then 3 when 't' then 1