Removed remeber me cookie script functions to file
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user