Give the possibility to change cookie's name
This commit is contained in:
parent
249a00dd7e
commit
933ea94c31
|
|
@ -118,6 +118,7 @@ In PHP for example, you can bypass all the script by setting this var `tarteauci
|
|||
<script type="text/javascript">
|
||||
tarteaucitron.init({
|
||||
"hashtag": "#tarteaucitron", /* Ouverture automatique du panel avec le hashtag */
|
||||
"cookieName": "tartaucitron", /* Nom du cookie */
|
||||
"highPrivacy": false, /* désactiver le consentement implicite (en naviguant) ? */
|
||||
"orientation": "top", /* le bandeau doit être en haut (top) ou en bas (bottom) ? */
|
||||
"adblocker": false, /* Afficher un message si un adblocker est détecté */
|
||||
|
|
|
|||
|
|
@ -181,6 +181,7 @@ var tarteaucitron = {
|
|||
defaults = {
|
||||
"adblocker": false,
|
||||
"hashtag": '#tarteaucitron',
|
||||
"cookieName": 'tarteaucitron',
|
||||
"highPrivacy": false,
|
||||
"orientation": "top",
|
||||
"removeCredit": false,
|
||||
|
|
@ -886,7 +887,7 @@ var tarteaucitron = {
|
|||
expireTime = time + timeExipre, // 365 days
|
||||
regex = new RegExp("!" + key + "=(wait|true|false)", "g"),
|
||||
cookie = tarteaucitron.cookie.read().replace(regex, ""),
|
||||
value = 'tarteaucitron=' + cookie + '!' + key + '=' + status,
|
||||
value = tarteaucitron.parameters.cookieName + '=' + cookie + '!' + key + '=' + status,
|
||||
domain = (tarteaucitron.parameters.cookieDomain !== undefined && tarteaucitron.parameters.cookieDomain !== '') ? 'domain=' + tarteaucitron.parameters.cookieDomain + ';' : '';
|
||||
|
||||
if (tarteaucitron.cookie.read().indexOf(key + '=' + status) === -1) {
|
||||
|
|
@ -898,7 +899,7 @@ var tarteaucitron = {
|
|||
},
|
||||
"read": function () {
|
||||
"use strict";
|
||||
var nameEQ = "tarteaucitron=",
|
||||
var nameEQ = tarteaucitron.parameters.cookieName + "=",
|
||||
ca = document.cookie.split(';'),
|
||||
i,
|
||||
c;
|
||||
|
|
|
|||
Loading…
Reference in New Issue