modification du cookie de consentement

This commit is contained in:
Fred Tempez 2024-09-15 19:00:53 +02:00
parent 776afaff03
commit 35d0b2aa3c
2 changed files with 5 additions and 4 deletions

View File

@ -216,12 +216,14 @@ core.start = function () {
// Variables des cookies
var getUrl = window.location;
var domain = "domain=" + getUrl.hostname + ";";
var basePath = getUrl.pathname.substring(0, getUrl.pathname.lastIndexOf('/') + 1);
var path = "path=" + basePath + ";";
var e = new Date();
e.setFullYear(e.getFullYear() + 1);
var expires = "expires=" + e.toUTCString();
var expires = "expires=" + e.toUTCString() + ";";
// Stocke le cookie d'acceptation
document.cookie = "ZWII_COOKIE_CONSENT=true;samesite=strict;" + domain + expires;
document.cookie = "ZWII_COOKIE_CONSENT=true; samesite=lax; " + domain + path + expires;
});

View File

@ -265,7 +265,6 @@ $(document).ready(function () {
$('span#screenWeight').each(function(index){
var weight = parseFloat($(this).text());
var fileType = $('span#screenType').eq(index).text();
console.log(weight);
if ((fileType === "jpg" || fileType === "jpeg") && weight < 5000000) {
$(this).css("color", "green");
} else {