How do I make an event listener that runs when you switch back to a window?
I've tried "focus", but it only runs when you click inside a form on the window. How do I make it run every time you tab back to the window?
Here's my current code I'm running:
<script type="text/javascript">
document.addEventListener("focus", getURL, true);
function getURL(){
//code
}
</script>