Move CSS class addition to init; remember value of setting so we stay consistent if setting changed.
This commit is contained in:
parent
5a5dd2a0c3
commit
6570faff7a
@ -14,6 +14,11 @@ QuoteBacklink =
|
||||
init: ->
|
||||
return if g.VIEW not in ['index', 'thread'] or !Conf['Quote Backlinks']
|
||||
|
||||
# Add a class to differentiate when backlinks are at
|
||||
# the top (default) or bottom of a post
|
||||
if (@bottomBacklinks = Conf['Bottom Backlinks'])
|
||||
$.addClass doc, 'bottom-backlinks'
|
||||
|
||||
Callbacks.Post.push
|
||||
name: 'Quote Backlinking Part 1'
|
||||
cb: @firstNode
|
||||
@ -48,10 +53,6 @@ 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
|
||||
@ -59,7 +60,7 @@ QuoteBacklink =
|
||||
return unless @isReply or Conf['OP Backlinks']
|
||||
container = QuoteBacklink.getContainer @fullID
|
||||
@nodes.backlinkContainer = container
|
||||
if Conf['Bottom Backlinks']
|
||||
if QuoteBacklink.bottomBacklinks
|
||||
$.add @nodes.post, container
|
||||
else
|
||||
$.add @nodes.info, container
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user