make bottom QR and update links work with JSON Navigation
This commit is contained in:
parent
da29a062e6
commit
bf1c3b4f01
@ -16,12 +16,6 @@ ThreadUpdater =
|
||||
$.addClass doc, 'float'
|
||||
$.add d.body, sc
|
||||
|
||||
updateLink = $.el 'span',
|
||||
innerHTML: '[<a href="javascript:;" class="update-link">Update</a>]'
|
||||
|
||||
$.ready ->
|
||||
$.add $('.navLinksBot'), updateLink
|
||||
|
||||
@checkPostCount = 0
|
||||
|
||||
@timer = $ '#update-timer', sc
|
||||
@ -30,7 +24,17 @@ ThreadUpdater =
|
||||
|
||||
$.on @timer, 'click', @update
|
||||
$.on @status, 'click', @update
|
||||
$.on $('.update-link', updateLink), 'click', @update
|
||||
|
||||
unless Conf['JSON Navigation'] and $ '.updatelink', Index.navLinksBot
|
||||
#updateLink = $.el 'span',
|
||||
# innerHTML: '[<a href="javascript:;">Update</a>]'
|
||||
# className: 'updatelink'
|
||||
updateLink = $.el 'span',
|
||||
innerHTML: '<a href="javascript:;">Update</a>'
|
||||
className: 'brackets-wrap updatelink'
|
||||
$.ready ->
|
||||
$.add (Index.navLinksBot or $('.navLinksBot')), [$.tn(' '), updateLink]
|
||||
$.on updateLink.firstElementChild, 'click', @update
|
||||
|
||||
subEntries = []
|
||||
for name, conf of Config.updater.checkbox
|
||||
|
||||
@ -56,10 +56,10 @@ QR =
|
||||
if Conf['QR Shortcut']
|
||||
$.rmClass $('.qr-shortcut'), 'disabled'
|
||||
|
||||
if Conf['Bottom QR Link'] and g.VIEW is 'thread'
|
||||
if Conf['Bottom QR Link'] and (g.VIEW is 'thread' or Conf['JSON Navigation'])
|
||||
linkBot = $.el 'div',
|
||||
innerHTML: '[<a href="javascript:;" class="qr-link-bottom">Reply to Thread</a>]'
|
||||
className: "qr-link-container-bottom"
|
||||
innerHTML: '<a href="javascript:;" class="qr-link-bottom">Reply to Thread</a>'
|
||||
className: "brackets-wrap qr-link-container-bottom"
|
||||
|
||||
$.on linkBot.firstElementChild, 'click', ->
|
||||
$.event 'CloseMenu'
|
||||
@ -68,7 +68,7 @@ QR =
|
||||
if Conf['QR Shortcut']
|
||||
$.rmClass $('.qr-shortcut'), 'disabled'
|
||||
|
||||
$.prepend $('.navLinksBot'), linkBot
|
||||
$.prepend (Index.navLinksBot or $('.navLinksBot')), linkBot
|
||||
|
||||
$.before $.id('togglePostFormLink'), link
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user