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 ?
Absolutely, custom action with JS registration does the job.
As for other JS stuff, it gives some rush time as all intellectual property comes out. We usually use CSOM and remote code based provision on top of SPMeta2 library – https://github.com/SubPointSolutions/spmeta2
I wrote about that here – http://sharepoint-community.net/profiles/blogs/sharepoint-artifacts-provision-part-2-meet-spmeta2-library