fixed bug

This commit is contained in:
MathMan05 2024-06-20 22:29:02 -05:00
parent cf0e1eddb4
commit cbd5469e52
3 changed files with 6 additions and 6 deletions

View file

@ -87,25 +87,25 @@ class embed{
}
if(this.json.footer||this.json.timestamp){
const footer=document.createElement("div");
if(this.json.footer.icon_url){
if(this.json?.footer?.icon_url){
const img=document.createElement("img");
img.src=this.json.footer.icon_url;
img.classList.add("embedicon");
footer.append(img);
}
if(this.json.footer.text){
if(this.json?.footer?.text){
const span=document.createElement("span");
span.textContent=this.json.footer.text;
span.classList.add("spaceright");
footer.append(span);
}
if(this.json.footer.text&&this.json.timestamp){
if(this.json?.footer&&this.json?.timestamp){
const span=document.createElement("b");
span.textContent="-";
span.classList.add("spaceright");
footer.append(span);
}
if(this.json.timestamp){
if(this.json?.timestamp){
const span=document.createElement("span")
span.textContent=new Date(this.json.timestamp).toLocaleString();;
footer.append(span);

View file

@ -21,7 +21,7 @@ async function registertry(e){
email:email,
username:username,
password:password,
consent:elements[5].checked,
consent:elements[6].checked,
}),
headers:{
"content-type": "application/json"

View file

@ -84,7 +84,7 @@
--scrollbar-track: #d5d1e2;
--scrollbar-thumb: #b0afc0;
--scrollbar-thumb-hover: #a5a5b8;
--embed: #cdccd1;
--embed: #f2f3f5;
}
.Light-theme {
color-scheme: light;