History

Fix #1049

Jasper van Merle committed 7 years ago

Commit 22094f71 parent 991ee5a2 files · +4 −4Browse files

Unified · Split

2 files
  1. assets/javascripts/lib/page.coffee +2 −2
  2. assets/javascripts/views/layout/document.coffee +2 −2
assets/javascripts/lib/page.coffee+2−2
@@ -208,12 +208,12 @@ track = -> · 207 unmodified lines
208 # Only ask for consent once per browser session208 # Only ask for consent once per browser session
209 Cookies.set('analyticsConsentAsked', '1')209 Cookies.set('analyticsConsentAsked', '1')
210 210
211 new app.views.Notif 'AnalyticsConsent', autoHide: null211 new app.views.Notif 'AnalyticsConsent', autoHide: false
212 return212 return
213 213
214@resetAnalytics = ->214@resetAnalytics = ->
215 for cookie in document.cookie.split(/;\s?/)215 for cookie in document.cookie.split(/;\s?/)
216 name = cookie.split('=')[0]216 name = cookie.split('=')[0]
217 if name[0] == '_'217 if name[0] == '_' && name[1] != '_'
218 Cookies.expire(name)218 Cookies.expire(name)
219 return219 return
assets/javascripts/views/layout/document.coffee+2−2
@@ -80,6 +80,6 @@ class app.views.Document extends app.View · 79 unmodified lines
80 when 'reboot' then app.reboot()80 when 'reboot' then app.reboot()
81 when 'hard-reload' then app.reload()81 when 'hard-reload' then app.reload()
82 when 'reset' then app.reset() if confirm('Are you sure you want to reset DevDocs?')82 when 'reset' then app.reset() if confirm('Are you sure you want to reset DevDocs?')
83 when 'accept-analytics' then Cookies.set('analyticsConsent', '1') && app.reboot()83 when 'accept-analytics' then Cookies.set('analyticsConsent', '1', expires: 1e8) && app.reboot()
84 when 'decline-analytics' then Cookies.set('analyticsConsent', '0') && app.reboot()84 when 'decline-analytics' then Cookies.set('analyticsConsent', '0', expires: 1e8) && app.reboot()
85 return85 return