custom right click menu (not finished, just showing and hiding currently)

This commit is contained in:
Rusty Striker 2024-10-04 14:46:20 +03:00
parent 69baf79b8f
commit 97475599a7
Signed by: RustyStriker
GPG key ID: 9DBDBC7C48FC3C31

View file

@ -62,6 +62,10 @@
<hr style='width: 75%;' />
${m.text}
`
msg.oncontextmenu = () => {
document.getElementById('msg-context-menu').style.display = 'flex';
return false;
}
let history = document.getElementById('chat-history');
// this is to force update everytime we get a duplicate msg to allow msg editing (yay)
let exists = Array.from(history.children).filter(e => e.style.order == m.id)[0];
@ -137,7 +141,6 @@
background-color:#0f0f2f;
}
.chat-message {
background-color: #ffffd6;
color: #000000;
border-width: 2px;
@ -185,5 +188,10 @@
</div>
</div>
</div>
<div id="msg-context-menu" class="chat-message" style="display: none; position: absolute; z-index: 1000; top: 0px;">
<ul>
<li onclick='document.getElementById("msg-context-menu").style.display="none"'>Edit</li>
</ul>
</div>
</body>
</html>