klaro-js icon indicating copy to clipboard operation
klaro-js copied to clipboard

Exclude pages on which the cookie window is displayed

Open EasyPeasy1 opened this issue 4 years ago • 1 comments

The problem

According to the current law, the user must be able to access, for example, the privacy policy and the imprint without having to give consent to the cookies.

Proposed solution

Provide the possibility that the cookie window is not displayed on certain subpages, which can be entered via config.js, and that no cookies are set when the defined subpages are called.

EasyPeasy1 avatar Feb 18 '21 12:02 EasyPeasy1

I don't know if it's an smart solution, but you can overwrite certain values of your settings at the end of the configuration:

if ( (window.location.href.indexOf("privacy") > -1) || (window.location.href.indexOf("imprint") > -1) ) {
    klaroConfig["noticeAsModal"] = false;
}

Would be happy about code improvements of my suggestion :-)

robinson2 avatar Mar 07 '21 11:03 robinson2