From ff133309db01d0b913d0b812a234a0185138b51f Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 19 Mar 2021 07:59:36 +0100 Subject: [PATCH] set cookies globally for the site --- scripts/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/util.js b/scripts/util.js index fb97f90..7dc7eee 100644 --- a/scripts/util.js +++ b/scripts/util.js @@ -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() {