add option to enable DoNotTrackSupport support :

default : false
to enable add :
"handleBrowserDNTRequest": true /* Répondre au DoNotTrack du navigateur*/
to on page tarteaucitron.init script.
This commit is contained in:
eldk 2018-06-12 16:09:35 +02:00
parent 87d590e476
commit d20fe6798a
1 changed files with 4 additions and 2 deletions

View File

@ -183,7 +183,8 @@ var tarteaucitron = {
"orientation": "top",
"removeCredit": false,
"showAlertSmall": true,
"cookieslist": true
"cookieslist": true,
"handleBrowserDNTRequest": false
},
params = tarteaucitron.parameters;
@ -196,6 +197,7 @@ var tarteaucitron = {
tarteaucitron.orientation = defaults.orientation;
tarteaucitron.hashtag = defaults.hashtag;
tarteaucitron.highPrivacy = defaults.highPrivacy;
tarteaucitron.handleBrowserDNTRequest = defaults.handleBrowserDNTRequest;
// Step 1: load css
linkElement.rel = 'stylesheet';
@ -463,7 +465,7 @@ var tarteaucitron = {
}
tarteaucitron.state[service.key] = false;
tarteaucitron.userInterface.color(service.key, false);
} else if (!isResponded && isDNTRequested) {
} else if (!isResponded && isDNTRequested && tarteaucitron.handleBrowserDNTRequest) {
tarteaucitron.cookie.create(service.key, 'false');
if (typeof service.fallback === 'function') {
service.fallback();