Removed remeber me cookie script functions to file

This commit is contained in:
2025-10-20 16:00:26 -05:00
parent 926f2b6174
commit c22ddbccdb
2 changed files with 22 additions and 25 deletions

View File

@ -5,35 +5,20 @@ ctx.canvas.height = window.screen.availHeight;
rock = new Image();
rock.src = "/media/Art/Rock1.png";
ctx.fill()
function remeberMe(){
let input = document.getElementById("username");
let username = input.value;
document.cookie = "username=" + username;
console.log(username);
cookieStore.getAll().then(data => {
console.log(data);
})
function setup(){
let canvas = createCanvas(ctx.canvas.width, ctx.canvas.height);
}
function forgetMe(){
document.cookie = "username=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"
console.log("Poof!...");
}
cookieStore.getAll().then(data => {
if (data){
for(let i = 0; i < data.length; i++){
console.log(data[i]["value"]);
if (data[i]["name"] == "username"){
let username = data[i]["value"];
document.getElementById("intotitle").textContent = "Welcome back " + username + " to the Void System";
}
}
}
function draw(){
x = 0;
y = 0;
drawCircle(x, y, 200);
x += 1;
y -= 0.001;
console.log(document.cookie);
})
}
var resolutionTag = document.getElementById("resolutionTag");
resolutionTag.textContent = "document: " + window.screen.availWidth + "x" + window.screen.availHeight + ", inner window: " + window.innerWidth + "x" + window.innerHeight;
@ -57,6 +42,7 @@ particle = {
draw: function(){
ctx.drawImage(rock, self.x, self.y);
}
}