Skip to content

Commit c12f0a5

Browse files
authored
Merge pull request #50 from empreinte-digitale/feature-remove-implicit-consent
Removed implicit consent
2 parents a419d51 + f912c60 commit c12f0a5

4 files changed

Lines changed: 1 addition & 37 deletions

File tree

README.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,6 @@ var orejimeConfig = {
140140
// defaults to false
141141
mustNotice: false,
142142

143-
// Optional. If "implicitConsent" is set to true, Orejime will automatically accept
144-
// cookies if the user continues his navigation on the website after the
145-
// first page. If you enable this, you must warn the user
146-
// of this behavior in the notice window. You can do that easily by overriding
147-
// translation strings (see below).
148-
// defaults to false
149-
implicitConsent: false,
150-
151143
// Optional. You can define the UI language directly here. If undefined, Orejime will
152144
// use the value given in the global "lang" variable, or fallback to the value
153145
// in the <html> lang attribute, or fallback to "en".

dist/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ <h2 class="Inset-title">They're using Orejime</h2>
134134
window.orejimeConfig = {
135135
appElement: "#app",
136136
privacyPolicy: "#privacyPolicy",
137-
implicitConsent: true,
138137
cookieDomain: 'orejime.com',
139138
translations: {
140139
en: {

src/consent-manager.js

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@ export default class ConsentManager {
1111
this.executedOnce = {} //keep track of which apps have been executed at least once
1212
this.watchers = new Set([])
1313
this.loadConsents()
14-
if (this.hasImplicitConsent()) {
15-
this.saveAndApplyConsents()
16-
} else {
17-
this.applyConsents()
18-
}
14+
this.applyConsents()
1915
}
2016

2117
get cookieName(){
@@ -114,28 +110,6 @@ export default class ConsentManager {
114110
this.changed = true
115111
}
116112

117-
hasImplicitConsent(){
118-
if (this.confirmed) {
119-
return false
120-
}
121-
122-
const enableImplicitConsent = typeof this.config.implicitConsent !== 'undefined'
123-
? this.config.implicitConsent
124-
: false
125-
if (!enableImplicitConsent) {
126-
return false
127-
}
128-
129-
const currentHost = document.location.hostname
130-
const referrerHost = document.referrer.split('/')[2]
131-
const isFirstVisit = currentHost !== referrerHost
132-
if (isFirstVisit) {
133-
return false
134-
}
135-
136-
return true
137-
}
138-
139113
loadConsents(){
140114
const consentCookie = getCookie(this.cookieName)
141115
if (consentCookie !== null && consentCookie.value !== ''){

src/orejime.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ export const defaultConfig = {
5252
default: true,
5353
mustConsent: false,
5454
mustNotice: false,
55-
implicitConsent: false,
5655
logo: false,
5756
lang: language(),
5857
translations: {},

0 commit comments

Comments
 (0)