Skip to content

Commit

Permalink
Sync custom user theme across subdomains
Browse files Browse the repository at this point in the history
  • Loading branch information
faisalnjs committed Dec 28, 2024
1 parent eedaddc commit 863957c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function setCookie(name, value, days) {
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + (value || "") + expires + "; path=/; domain=.vssfalcons.com";
document.cookie = `${name}=${(value || "")}${expires}; path=/; domain=.${document.domain}`;
}

function getCookie(name) {
Expand All @@ -66,4 +66,4 @@ function getCookie(name) {
return null;
}

export default new Storage("virtual-falcons-2");
export default new Storage("virtual-falcons");

0 comments on commit 863957c

Please sign in to comment.