Skip to content

Commit 65ed48c

Browse files
committed
Removed implicit consent
1 parent ced7a42 commit 65ed48c

3 files changed

Lines changed: 1 addition & 36 deletions

File tree

README.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,6 @@ var orejimeConfig = {
137137
// defaults to false
138138
mustNotice: false,
139139

140-
// Optional. If "implicitConsent" is set to true, Orejime will automatically accept
141-
// cookies if the user continues his navigation on the website after the
142-
// first page. If you enable this, you must warn the user
143-
// of this behavior in the notice window. You can do that easily by overriding
144-
// translation strings (see below).
145-
// defaults to false
146-
implicitConsent: false,
147-
148140
// Optional. You can define the UI language directly here. If undefined, Orejime will
149141
// use the value given in the global "lang" variable, or fallback to the value
150142
// 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(){
@@ -108,28 +104,6 @@ export default class ConsentManager {
108104
this.changed = true
109105
}
110106

111-
hasImplicitConsent(){
112-
if (this.confirmed) {
113-
return false
114-
}
115-
116-
const enableImplicitConsent = typeof this.config.implicitConsent !== 'undefined'
117-
? this.config.implicitConsent
118-
: false
119-
if (!enableImplicitConsent) {
120-
return false
121-
}
122-
123-
const currentHost = document.location.hostname
124-
const referrerHost = document.referrer.split('/')[2]
125-
const isFirstVisit = currentHost !== referrerHost
126-
if (isFirstVisit) {
127-
return false
128-
}
129-
130-
return true
131-
}
132-
133107
loadConsents(){
134108
const consentCookie = getCookie(this.cookieName)
135109
if (consentCookie !== null && consentCookie.value !== ''){

0 commit comments

Comments
 (0)