Adding links to Suite Bar in Office 365

So we want to add few custom links to the Delta suite bar within Office 356. You can either add it to the Script Editor webpart to add these links for single page or add it to the master page if you want so.

Before:

suitebar_before

After:

suitebar_after

 

<script type="text/javascript">    
    
        $(document).ready(function() {
           var addLinks = "<div class='o365cs-nav-O365LinksItem'><div><a title='Google' class='o365button o365cs-nav-navItem o365cs-nav-workloadLink o365cs-spo-topnavLink o365cs-topnavLink' id='O365_MainLink_ShellMail' role='menuitem' aria-disabled='false' aria-selected='false' aria-label='Google' href='http://google.co.uk'><span>Google</span><div class='o365cs-activeLinkIndicator o365cs-nw-b' style='display: none;'></div></a></div><div style='display: none;'></div></div>";

addLinks +=  "<div class='o365cs-nav-O365LinksItem'><div><a title='Bing' class='o365button o365cs-nav-navItem o365cs-nav-workloadLink o365cs-spo-topnavLink o365cs-topnavLink' id='O365_MainLink_secondLink' role='menuitem' aria-disabled='false' aria-selected='false' aria-label='Bing' href='http://bing.co.uk'><span>Bing</span> <div class='o365cs-activeLinkIndicator o365cs-nw-b' style='display:none;'></div></a></div><div style='display: none;'></div></div>";
        $('.o365cs-nav-O365Links div:first').prepend(addLinks);
     });
   </script>