Created
April 23, 2020 12:17
-
-
Save aarondicks/d281f03a4ea306c36a3aee1083cdf7f3 to your computer and use it in GitHub Desktop.
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
jQuery(document).ready(function($) { | |
/** | |
* Title tag fun | |
*/ | |
var message = "Come back for more! 🎉"; | |
var original; | |
$(window).focus(function() { | |
if (original) { | |
document.title = original; | |
} | |
}).blur(function() { | |
var title = $('title').text(); | |
if (title != message) { | |
original = title; | |
} | |
document.title = message; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment