pull/1053/head
Jasper van Merle 6 years ago
parent 991ee5ab7f
commit 22094f7dcf

@ -208,12 +208,12 @@ track = ->
# Only ask for consent once per browser session
Cookies.set('analyticsConsentAsked', '1')
new app.views.Notif 'AnalyticsConsent', autoHide: null
new app.views.Notif 'AnalyticsConsent', autoHide: false
return
@resetAnalytics = ->
for cookie in document.cookie.split(/;\s?/)
name = cookie.split('=')[0]
if name[0] == '_'
if name[0] == '_' && name[1] != '_'
Cookies.expire(name)
return

@ -80,6 +80,6 @@ class app.views.Document extends app.View
when 'reboot' then app.reboot()
when 'hard-reload' then app.reload()
when 'reset' then app.reset() if confirm('Are you sure you want to reset DevDocs?')
when 'accept-analytics' then Cookies.set('analyticsConsent', '1') && app.reboot()
when 'decline-analytics' then Cookies.set('analyticsConsent', '0') && app.reboot()
when 'accept-analytics' then Cookies.set('analyticsConsent', '1', expires: 1e8) && app.reboot()
when 'decline-analytics' then Cookies.set('analyticsConsent', '0', expires: 1e8) && app.reboot()
return

Loading…
Cancel
Save