clear du code #6

Merged
rebillar merged 4 commits from dev into master 2024-01-01 18:38:52 +01:00
2 changed files with 26 additions and 0 deletions
Showing only changes of commit d57e7e4ac5 - Show all commits

View file

@ -85,6 +85,23 @@ html, body{
text-align: center;
}
.concordRemoveBtn{
width: 15px;
height: 15px;
padding: 0px;
line-height: 0px;
cursor: pointer;
color: white;
background-color: transparent;
border-radius: 7.5px;
font-size: 10px;
border: 2px solid white;
box-sizing: border-box;
position: absolute;
top: 2px;
right: 2px;
}
#chatInput{
width: 90%;
box-sizing: border-box;
@ -103,6 +120,7 @@ html, body{
color: white;
font-family: sans-serif;
margin: 3%;
position: relative;
}
.messageTitle{

View file

@ -86,6 +86,13 @@ class Phone{
h2.className = "messageTitle";
h2.innerText = message.title;
let btn = document.createElement("button");
btn.className = "concordRemoveBtn"
btn.innerText = "X"
btn.onclick = ()=>{
msg.remove();
}
let p;
let match = message.content.match(/:(\w+):/);
if(match){
@ -100,6 +107,7 @@ class Phone{
msg.appendChild(h2);
msg.appendChild(p);
msg.appendChild(btn)
this.contentmsg.appendChild(msg);
this.contentmsg.scrollTop = this.contentmsg.scrollHeight;