Skip to content

Commit 5bb4b75

Browse files
committed
Merge branch 'main' into deployment
2 parents 7078807 + e8b9e5e commit 5bb4b75

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/js/lib/cookies.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const docCookies = {
3636
return false;
3737
}
3838
var expires = new Date();
39-
expires.setMonth(expires.getDate() + duration);
39+
expires.setDate(expires.getDate() + duration);
4040

4141
var sExpires = '; expires=' + expires.toUTCString();
4242
document.cookie =

src/js/lib/notifications.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class NotificationsManager {
5151
}
5252

5353
updateTimestamp() {
54-
this.cookieJar.setItem('HT.notice', this.effectiveOn(), null, '/', HT.cookies_domain);
54+
this.cookieJar.setItem('HT.notice', this.effectiveOn(), 90);
5555
}
5656
}
5757

src/js/lib/utils.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,7 @@ function setupHTEnv() {
9292
var prefs = HT.prefs.get();
9393
prefs = mergeDeep(prefs, params);
9494
try {
95-
var expires = new Date();
96-
expires.setDate(expires.getDate() + 90);
97-
cookies.setItem('HT.prefs', JSON.stringify(prefs), expires, '/', HT.cookies_domain, true);
95+
cookies.setItem('HT.prefs', JSON.stringify(prefs), 90);
9896
} catch (e) {
9997
// noop
10098
console.log(e);

0 commit comments

Comments
 (0)