Unified · Split
| @@ -208,12 +208,12 @@ track = -> · 207 unmodified lines | |||
| 208 | # Only ask for consent once per browser session | 208 | # 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: null | 211 | new app.views.Notif 'AnalyticsConsent', autoHide: false |
| 212 | return | 212 | 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 | return | 219 | return |
| @@ -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 | return | 85 | return |