Created
April 24, 2017 17:21
-
-
Save GeoffEW/aed5b070daf3275d7005e8455f59c79c to your computer and use it in GitHub Desktop.
Prevents the <title> attribute for the page (displayed in the browser tab) from changing to “Events for <month> <year> – <sitename>” when navigating in a calendar embedded in a page using a full calendar shortcode.
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
<?php | |
(function () { | |
var lastTitle = undefined; | |
function checkTitle() { | |
if (lastTitle != document.title) { | |
document.title = 'My Desired Title'; | |
lastTitle = document.title; | |
} | |
setTimeout(checkTitle, 100); | |
}; | |
checkTitle(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment