event (as telegram does when you select messages to forward) and this is what I come up with:
let isClicked = false;
document.addEventListener("mousedown", function(event) {
isClicked = true;
})
document.addEventListener("mouseup", function(event) {
isClicked = false;
})
const messages = document.querySelectorAll(".message.default");
messages.forEach((message) => {
message.addEventListener("mouseenter", function (event) {
if (isClicked) {
console.log("click+hover");
}
});
});
can be done better?
Send a video about that functionality Telegram does 🤔
Обсуждают сегодня