siwwy :3 #3

Closed
RoscoeDaWah wants to merge 261 commits from feat-privacy into master
Showing only changes of commit 6f695daddc - Show all commits

View file

@ -26,10 +26,11 @@ function getCookie(cname) {
* @param {number} exdays Cookie lifespan (days)
*/
function setCookie(cname, cvalue, exdays) {
const hostname = window.location.hostname;
const d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
let expires = "expires="+ d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/;SameSite=Strict;Domain=.diskfloppy.me";
document.cookie = `${cname}=${cvalue};${expires};path=/;SameSite=Strict;Domain=${hostname}`
}
/**