I was wondering what techniques there are to get a chunk of html / js injected onto each and every page in 365? Here’s the solutions that come to my mind :
- Add the snippet onto all the master pages.
- Add a web part (containing the snippet) onto each and every page.
- Feature with custom action (Not tested!)
Any other tricks or techniques?
In addition to getting code working on SharePoint Online, what about Outlook, Yammer and the other Office apps ?
Hi Bala,
Take a look at Chris O’Briens session from lessons learned in sp24. One of the teams at content and code made a nice site manager purely from JS.
Here’s a link to his session : https://www.sp24conf.com/2014-1/Conf/SP24S108/ConfPages/SessionRoom.aspx
As for Marks question, the future proof* at the moment, is to use a custom action. Either ScriptBlock or ScriptLink the JS. Of course make sure you JS is properly written, for the place you want to execute it. Or you will have issues further down the line.
Hugh