Created
May 16, 2017 06:56
-
-
Save aflyen/592b821c33f8ae8590c4e45bc5b05c6d 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
function addMigrationInfo(sender, args) { | |
SP.SOD.executeFunc('sp.js', 'SP.ClientContext', function() { | |
var statusId = SP.UI.Status.addStatus("This site has moved. Please update you bookmarks and visit the new location: <a href='" + url + "'>" + url + "</a>"); | |
SP.UI.Status.setStatusPriColor(statusId, 'yellow'); | |
}); | |
} | |
// Initialize the statusbar as late as possible, see: https://blog.josequinto.com/2015/06/16/custom-javascript-function-loaded-after-the-ui-has-loaded-in-sharepoint-2013/ | |
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(addMigrationInfo); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment