Skip to content

Instantly share code, notes, and snippets.

@aarondicks
Created April 23, 2020 12:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aarondicks/d281f03a4ea306c36a3aee1083cdf7f3 to your computer and use it in GitHub Desktop.
Save aarondicks/d281f03a4ea306c36a3aee1083cdf7f3 to your computer and use it in GitHub Desktop.
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