SharePoint Online - Replace the top bar text using Javascript

This master page hack will help you replace the Office 365 text in the top Bar next to the app launcher


Put this code right above the </body> tag in your master page:




<!---Style the SharePoint top bar logo -->
<SharePoint:ScriptBlock runat="server">
if (typeof jQuery == 'undefined')
{
document.write('<script type="text/javascript" src="//code.jquery.com/jquery.min.js"><' +         '/script>');
}
 var interval = setInterval(function(){
if($('span.o365cs-nav-brandingText').length)
{     
$('span.o365cs-nav-brandingText').html("<a href='https://yourtenant.sharepoint.com/'>My Custom Text</a>");
$('span.o365cs-nav-brandingText').attr("style","padding-top: 3px");
clearInterval(interval);             
}
}, 1000); 
</SharePoint:ScriptBlock>
<!--- End Style the SharePoint top bar logo -->


Source: https://sharepoint.stackexchange.com/questions/108695/replacing-the-office-365-logo-and-link-in-sharepoint-online-suite-bar
Share on Google Plus

About Tom DeMeulenaere

Highly accomplished information technology professional with extensive knowledge in System Center Configuration Manager, Windows Server, SharePoint, and Office 365.
    Blogger Comment

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.