Skip to content

Commit

Permalink
Add Header.noticesRoot as early as possible to increase likelihood er…
Browse files Browse the repository at this point in the history
…ror messages show up in event of problem.
  • Loading branch information
ccd0 committed Jul 25, 2019
1 parent b8a9077 commit e38e6e2
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/General/Header.coffee
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
Header =
init: ->
$.onExists doc, 'body', =>
return unless Main.isThisPageLegit()
$.add @bar, [@noticesRoot, @toggle]
$.prepend d.body, @bar
$.add d.body, Header.hover
@setBarPosition Conf['Bottom Header']

@menu = new UI.Menu 'header'

menuButton = $.el 'span',
Expand Down Expand Up @@ -86,12 +93,6 @@ Header =

@setBoardList()

$.onExists doc, 'body', =>
return unless Main.isThisPageLegit()
$.prepend d.body, @bar
$.add d.body, Header.hover
@setBarPosition Conf['Bottom Header']

$.onExists doc, "#{g.SITE.selectors.boardList} + *", Header.generateFullBoardList

Main.ready ->
Expand Down Expand Up @@ -154,7 +155,7 @@ Header =
btn = $('.hide-board-list-button', boardList)
$.on btn, 'click', Header.toggleBoardList

$.add Header.bar, [Header.boardList, Header.shortcuts, Header.noticesRoot, Header.toggle]
$.prepend Header.bar, [Header.boardList, Header.shortcuts]

Header.setCustomNav Conf['Custom Board Navigation']
Header.generateBoardList Conf['boardnav']
Expand Down Expand Up @@ -392,7 +393,7 @@ Header =
Header.previousOffset = offsetY

setBarPosition: (bottom) ->
Header.barPositionToggler.checked = bottom
Header.barPositionToggler?.checked = bottom
$.event 'CloseMenu'
args = if bottom then [
'bottom-header'
Expand Down

0 comments on commit e38e6e2

Please sign in to comment.