diff --git a/webpage/index.html b/webpage/index.html
index d1460ec..742fe8f 100644
--- a/webpage/index.html
+++ b/webpage/index.html
@@ -41,7 +41,7 @@
-
+
diff --git a/webpage/login.js b/webpage/login.js
index 3412e55..271f8b1 100644
--- a/webpage/login.js
+++ b/webpage/login.js
@@ -1,7 +1,5 @@
function getCookie(name) {
- const value = `; ${document.cookie}`;
- const parts = value.split(`; ${name}=`);
- if (parts.length === 2) return parts.pop().split(';').shift();
+ return localStorage.getItem(name);
}
async function login(username, password){
const options={
@@ -22,7 +20,7 @@ async function login(username, password){
return response.errors.login._errors[0].message;
console.log("test")
}
- document.cookie = "token="+response.token+"; expires="+new Date(Date.now()+(6.048e+8*2));
+ localStorage.setItem("token",response.token);
window.location.href = '/channels/@me';
return response.token;
})
@@ -31,7 +29,8 @@ async function login(username, password){
};
}
function gettoken(){
- const temp=getCookie("token");
+ let temp=getCookie("token");
+ temp??=undefined;
if(temp===undefined){
window.location.href = '/login.html';
}
diff --git a/webpage/message.js b/webpage/message.js
index 8e68cf3..c927a5a 100644
--- a/webpage/message.js
+++ b/webpage/message.js
@@ -122,7 +122,7 @@ class cmessage{
}
}
- div.appendChild(attatch)
+ messagedwrap.appendChild(attatch)
}
//
}else if(this.type===7){
diff --git a/webpage/style.css b/webpage/style.css
index a04f8d4..c844c60 100644
--- a/webpage/style.css
+++ b/webpage/style.css
@@ -219,8 +219,7 @@ div{
}
p{
- transition: background 0.1s ease-in-out;
- transition: color 0.1s ease-in-out;
+ transition: background 0.1s ease-in-out,color 0.1s ease-in-out;
width: 100%;
}
.username{
@@ -626,4 +625,4 @@ span{
}
.servernoti{
position:relative;
-}
\ No newline at end of file
+}
|