Skip to content

Instantly share code, notes, and snippets.

@ChristoPy
Last active May 30, 2018 05:25
Show Gist options
  • Save ChristoPy/af50cb523eef9a32e82871edf60b7a48 to your computer and use it in GitHub Desktop.
Save ChristoPy/af50cb523eef9a32e82871edf60b7a48 to your computer and use it in GitHub Desktop.
Get all the "last seen at.." on WhatsApp web.
let LastOnlineTime = "";
const AllLastOnlineTimes = [];
function CheckLastOnlineTime () {
if (document.querySelector (".O90ur").innerText != "online") {
if (LastOnlineTime !== document.querySelector (".O90ur").innerText) {
AllLastOnlineTimes.push (document.querySelector (".O90ur").innerText);
LastOnlineTime = document.querySelector (".O90ur").innerText;
}
}
}
const StopCheck = () => clearInterval (Clock);
let Clock = setInterval (() => CheckLastOnlineTime (), 1500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment