Don't insert things into .navLinksBot if it didn't load.

This commit is contained in:
ccd0 2016-01-23 14:51:14 -08:00
parent 806d352367
commit fc12dfc00e
3 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ ThreadUpdater =
className: 'brackets-wrap updatelink'
$.extend updateLink, <%= html('<a href="javascript:;">Update</a>') %>
Main.ready ->
$.add $('.navLinksBot'), [$.tn(' '), updateLink]
$.add navLinksBot, [$.tn(' '), updateLink] if (navLinksBot = $ '.navLinksBot')
$.on updateLink.firstElementChild, 'click', @update
subEntries = []

View File

@ -80,7 +80,7 @@ QR =
QR.open()
QR.nodes.com.focus()
$.prepend $('.navLinksBot'), linkBot
$.prepend navLinksBot, linkBot if (navLinksBot = $ '.navLinksBot')
origToggle = $.id 'togglePostFormLink'
$.before origToggle, link

View File

@ -39,7 +39,7 @@ QuoteThreading =
setThread: ->
QuoteThreading.thread = @
$.asap (-> !Conf['Thread Updater'] or $ '.navLinksBot > .updatelink'), ->
$.add $('.navLinksBot'), [$.tn(' '), QuoteThreading.threadNewLink]
$.add navLinksBot, [$.tn(' '), QuoteThreading.threadNewLink] if (navLinksBot = $ '.navLinksBot')
node: ->
return if @isFetchedQuote or @isClone or !@isReply