set cookies globally for the site
All checks were successful
Web/pipeline/head This commit looks good

This commit is contained in:
Ell 2021-03-19 07:59:36 +01:00
parent ee5c7b64f0
commit ff133309db

View file

@ -10,7 +10,7 @@ function getCookie(key) {
function setCookie(key, value, days) {
let date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
document.cookie = `${key}=${value}; expires=${date.toUTCString()}`;
document.cookie = `${key}=${value}; expires=${date.toUTCString()}; path=/`;
}
function forceToAnchor() {