Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,6 @@ var orejimeConfig = {
// defaults to false
mustNotice: false,

// Optional. If "implicitConsent" is set to true, Orejime will automatically accept
// cookies if the user continues his navigation on the website after the
// first page. If you enable this, you must warn the user
// of this behavior in the notice window. You can do that easily by overriding
// translation strings (see below).
// defaults to false
implicitConsent: false,

// Optional. You can define the UI language directly here. If undefined, Orejime will
// use the value given in the global "lang" variable, or fallback to the value
// in the <html> lang attribute, or fallback to "en".
Expand Down
1 change: 0 additions & 1 deletion dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ <h2 class="Inset-title">They're using Orejime</h2>
window.orejimeConfig = {
appElement: "#app",
privacyPolicy: "#privacyPolicy",
implicitConsent: true,
cookieDomain: 'orejime.com',
translations: {
en: {
Expand Down
28 changes: 1 addition & 27 deletions src/consent-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ export default class ConsentManager {
this.executedOnce = {} //keep track of which apps have been executed at least once
this.watchers = new Set([])
this.loadConsents()
if (this.hasImplicitConsent()) {
this.saveAndApplyConsents()
} else {
this.applyConsents()
}
this.applyConsents()
}

get cookieName(){
Expand Down Expand Up @@ -108,28 +104,6 @@ export default class ConsentManager {
this.changed = true
}

hasImplicitConsent(){
if (this.confirmed) {
return false
}

const enableImplicitConsent = typeof this.config.implicitConsent !== 'undefined'
? this.config.implicitConsent
: false
if (!enableImplicitConsent) {
return false
}

const currentHost = document.location.hostname
const referrerHost = document.referrer.split('/')[2]
const isFirstVisit = currentHost !== referrerHost
if (isFirstVisit) {
return false
}

return true
}

loadConsents(){
const consentCookie = getCookie(this.cookieName)
if (consentCookie !== null && consentCookie.value !== ''){
Expand Down
1 change: 0 additions & 1 deletion src/orejime.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export const defaultConfig = {
default: true,
mustConsent: false,
mustNotice: false,
implicitConsent: false,
logo: false,
lang: language(),
translations: {},
Expand Down