Skip to content

Instantly share code, notes, and snippets.

@testerzs
Created February 1, 2019 18:53
Show Gist options
  • Save testerzs/1362f5d8fbc69d59e19286307ca98c75 to your computer and use it in GitHub Desktop.
Save testerzs/1362f5d8fbc69d59e19286307ca98c75 to your computer and use it in GitHub Desktop.
//FacebookUserOnlineTime Shows info about when a specific user was online
//Visit https://www.messenger.com/t/USERNAME
//and run the following code in tour console
var prev = null
setInterval(function() {
var userName = document.getElementById('js_5') .getElementsByTagName('span')[0].innerHTML;
var statusText = document.getElementsByClassName("_2v6o");
for (var i = 0; i < statusText.length; i++) {
var statusInfo = statusText[i].innerText;
}
if (statusInfo != prev){
console.log(userName + ", " + Date().toLocaleString()+ ", " + statusInfo);
}
prev = statusInfo
}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment