Skip to content

Commit

Permalink
Merge pull request #5 from cameron/hide-tour-across-subdomains
Browse files Browse the repository at this point in the history
persist "hide tour" click across subdomains
  • Loading branch information
zackbloom committed Aug 9, 2016
2 parents f6d3f88 + 92222d7 commit 44abd12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions coffee/docBase.coffee
Expand Up @@ -164,7 +164,7 @@ processContext context
setEditorOverlayContext()

setUpTour = ->
return if window.localStorage?.hasRunTour
return if document.cookie.match(/hide-tour/)

tour = document.createElement 'div'
tour.className = 'tour'
Expand All @@ -180,7 +180,7 @@ setUpTour = ->

tour.addEventListener 'click', ->
tour.classList.add 'done'
window.localStorage?.hasRunTour = true
document.cookie = "hide-tour=1; domain=json.is"
setTimeout -> editor.focus()

setUpTour()
Expand Down

0 comments on commit 44abd12

Please sign in to comment.