From 738dd8991a98ef46f5816fd9607d535d58487be5 Mon Sep 17 00:00:00 2001 From: Johnny Date: Mon, 23 Oct 2017 12:18:11 +1100 Subject: [PATCH] Implement Bottom Backlinks - add a class to `html` to differentiate between backlink container positions - if enabled, have backlinks inserted into a container located at the bottom of the post --- src/Quotelinks/QuoteBacklink.coffee | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Quotelinks/QuoteBacklink.coffee b/src/Quotelinks/QuoteBacklink.coffee index 6aa02c7b6..eed30a8cd 100644 --- a/src/Quotelinks/QuoteBacklink.coffee +++ b/src/Quotelinks/QuoteBacklink.coffee @@ -48,6 +48,10 @@ QuoteBacklink = $.add container, nodes return secondNode: -> + # Add a class to differentiate when backlinks are at + # the top (default) or bottom of a post + if Conf['Bottom Backlinks'] + $.addClass doc, 'bottom-backlinks' if @isClone and (@origin.isReply or Conf['OP Backlinks']) @nodes.backlinkContainer = $ '.container', @nodes.info return @@ -55,7 +59,10 @@ QuoteBacklink = return unless @isReply or Conf['OP Backlinks'] container = QuoteBacklink.getContainer @fullID @nodes.backlinkContainer = container - $.add @nodes.info, container + if Conf['Bottom Backlinks'] + $.add @nodes.post, container + else + $.add @nodes.info, container getContainer: (id) -> @containers[id] or= $.el 'span', className: 'container'