When was it last seen and how long it was online.
let b = setInterval(() => {
let hora = new Date;
let a = document.getElementsByClassName("_2YPr_ i0jNr selectable-text copyable-text");
if (a.length) {
console.log(`ONLINE hora: ${hora.getHours()}:${hora.getMinutes()}:${hora.getSeconds()}`);
} else
console.log(`off ${hora.getHours()}:${hora.getMinutes()}`);
}, 3000)
โ๐บ Considerations
- The code is intended for parents to monitor their children when they are online (especially during the night).
- Just copy and paste into the console, after opening the chat, and leave it running. To do this, you must keep the computer turned on and the whatsapp web open.