diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index a1f6f870a..4c1d71fde 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -3003,11 +3003,11 @@ threadExcerpt: function(thread) { var OP, excerpt, _ref; OP = thread.OP; - excerpt = ((_ref = OP.info.subject) != null ? _ref.trim() : void 0) || OP.info.comment.replace(/\n+/g, ' // ') || Conf['Anonymize'] && 'Anonymous' || $('.nameBlock', OP.nodes.info).textContent.trim(); - if (excerpt.length > 70) { - excerpt = "" + excerpt.slice(0, 67) + "..."; + excerpt = ("/" + thread.board + "/ - ") + (((_ref = OP.info.subject) != null ? _ref.trim() : void 0) || OP.info.comment.replace(/\n+/g, ' // ') || Conf['Anonymize'] && 'Anonymous' || $('.nameBlock', OP.nodes.info).textContent.trim()); + if (excerpt.length > 73) { + return "" + excerpt.slice(0, 70) + "..."; } - return "/" + thread.board + "/ - " + excerpt; + return excerpt; }, threadFromRoot: function(root) { return g.threads["" + g.BOARD + "." + root.id.slice(1)]; diff --git a/builds/crx/script.js b/builds/crx/script.js index 39b5c9c40..23f1d84d1 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -3013,11 +3013,11 @@ threadExcerpt: function(thread) { var OP, excerpt, _ref; OP = thread.OP; - excerpt = ((_ref = OP.info.subject) != null ? _ref.trim() : void 0) || OP.info.comment.replace(/\n+/g, ' // ') || Conf['Anonymize'] && 'Anonymous' || $('.nameBlock', OP.nodes.info).textContent.trim(); - if (excerpt.length > 70) { - excerpt = "" + excerpt.slice(0, 67) + "..."; + excerpt = ("/" + thread.board + "/ - ") + (((_ref = OP.info.subject) != null ? _ref.trim() : void 0) || OP.info.comment.replace(/\n+/g, ' // ') || Conf['Anonymize'] && 'Anonymous' || $('.nameBlock', OP.nodes.info).textContent.trim()); + if (excerpt.length > 73) { + return "" + excerpt.slice(0, 70) + "..."; } - return "/" + thread.board + "/ - " + excerpt; + return excerpt; }, threadFromRoot: function(root) { return g.threads["" + g.BOARD + "." + root.id.slice(1)]; diff --git a/src/General/Get.coffee b/src/General/Get.coffee index e8144d849..f4114a676 100755 --- a/src/General/Get.coffee +++ b/src/General/Get.coffee @@ -1,13 +1,13 @@ Get = threadExcerpt: (thread) -> {OP} = thread - excerpt = OP.info.subject?.trim() or + excerpt = "/#{thread.board}/ - " + ( + OP.info.subject?.trim() or OP.info.comment.replace(/\n+/g, ' // ') or Conf['Anonymize'] and 'Anonymous' or - $('.nameBlock', OP.nodes.info).textContent.trim() - if excerpt.length > 70 - excerpt = "#{excerpt[...67]}..." - "/#{thread.board}/ - #{excerpt}" + $('.nameBlock', OP.nodes.info).textContent.trim()) + return "#{excerpt[...70]}..." if excerpt.length > 73 + excerpt threadFromRoot: (root) -> g.threads["#{g.BOARD}.#{root.id[1..]}"] threadFromNode: (node) ->