Created
April 29, 2015 03:44
-
-
Save Luciaisacomputer/dbca1f99e3aab5e6dcf8 to your computer and use it in GitHub Desktop.
Change the pages title when not focused
This file contains 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
function(){ | |
var a=document.title; | |
window.onblur=function(){ | |
document.title="Something Funny" | |
}, | |
window.onfocus=function(){ | |
document.title=a | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment