Skip to content
This repository has been archived by the owner on May 12, 2019. It is now read-only.

Commit

Permalink
Little refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Jan 8, 2016
1 parent a0b0185 commit 349ff87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions assets/js/src/__init.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ window.Uno = Uno =
Uno.app.dataset.page = Uno.context()
Uno.app.dataset.device = Uno.device()

# window global properties
$('#profile-title').text window.profile_title if window.profile_title
$('#profile-resume').text window.profile_resume if window.profile_resume
window.open_button = window.open_button or '.nav-posts > a'

3 changes: 1 addition & 2 deletions assets/js/src/cover.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
$ ->

isOpen = location.hash is '#open'
openButton = window.open_button or '.nav-posts > a'

_animate = ->
setTimeout(->
Expand All @@ -17,7 +16,7 @@ $ ->
$('#menu-button').click ->
$('.cover, main, #menu-button, html').toggleClass 'expanded'

$("#{openButton}, #avatar-link").click (event) ->
$("#{window.open_button}, #avatar-link").click (event) ->
if Uno.is 'page', 'home'
event.preventDefault()
location.hash = if location.hash is '' then '#open' else ''
Expand Down

0 comments on commit 349ff87

Please sign in to comment.