Last active
May 4, 2021 19:23
-
-
Save PoseidonCoder/034ed45e3b12774bc011c40bff1e0c6f to your computer and use it in GitHub Desktop.
just a simple script that will force you to pay attention to one tab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log("injecting 'PAY ATTENTION' script") | |
const title = document.getElementsByTagName('title')[0]; | |
let visible = true; | |
document.addEventListener("visibilitychange", (event)=> { | |
visible = !visible; | |
title.innerText = !visible ? "😠 PAY ATTENTION!" : "good job 🥳🎉" | |
console.log(visible) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment