Last active
May 7, 2018 23:47
-
-
Save itsmingjie/e763afcb4ffb4be968dd061d8266c1d7 to your computer and use it in GitHub Desktop.
Change title bar on unfocus
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
//Easter Egg | |
var originaltitle = document.title; | |
var blurcount = 0; | |
window.onblur = function() { | |
if (blurcount == 0) | |
document.title = "¬_¬ Hey!"; | |
else if (blurcount == 1) | |
document.title = "°Д° Come back!"; | |
else if (blurcount == 2) | |
document.title = "。゜(`Д´)!!!゜。"; | |
else if (blurcount == 3) | |
document.title = "ಠ_ಠ Srsly?"; | |
else if (blurcount == 4) | |
document.title = "(>ლ) No more!"; | |
else if (blurcount == 5) | |
document.title = "(ง'̀-'́)ง I said NO MORE!"; | |
else | |
document.title = "┬──┬ ノ( ゜-゜ノ)"; | |
$("#favicon").attr("href","/content/images/2017/01/snap.png"); | |
blurcount++; | |
} | |
window.onfocus = function() { | |
document.title = "(¬‿¬) Welcome back!"; | |
$("#favicon").attr("href","/content/images/2017/01/IMG_0550-1.jpg"); | |
setTimeout(function(){document.title = originaltitle}, 1500); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment