Add link to sharepoint suite bar - fail on first load
问题 I'm trying to use JavaScript to add a custom link to the suite bar in SharePoint (SharePoint 2016 on premise). The code works fine except for the first time I load the SharePoint site. Here it is: <script> var raiseFunc = function() { var link = document.createElement('a'); var linktext = document.createTextNode("Google"); link.href = "http://www.google.ca" link.setAttribute("class", "o365button o365cs-nav-appTitle o365cs-topnavText"); var span = document.createElement('span'); span