window.onload = function() {

var pageTitle = document.title;
var attentionMessage = ‘Come Back!’;

document.addEventListener(‘visibilitychange’, function(e) {
console.log(document.hidden);
});

};