I have a SharePoint online site collection and I want to add Custom/3rd party JavaScript reference(Jquery, Knockout etc.,) to site collection and all sub sites without modifying master page.

There are few approaches(custom user action) discussed here UserCustomActions and here. I want to add the JS reference only in Root site collection and still reference them in all sub sites.

What is the best approach?

1 Answer 1


In my opinion, the current best approach is to use the Google Chrome extension SP Editor. Although not (yet) a popularly used approach, the tool is extremely fast and flexible for injecting JavaScript files, and others, to the SharePoint site without touching the masterpages of SharePoint.

Check the demo of the tool too, to see what it's capable of!

I'm not involved with the tool in any manner, and actually came across with it very recently when a community member from here mentioned it.

  • Just to add something for clarification: no, this is not the "Microsoft's best practice", but as for a developer we want to have tools that enhance our tasks without being held back by restrictions, so this just might be the option for a developer.
    – moe
    Jun 13, 2017 at 10:25
  • I'm looking for a production ready solution and not looking for dev tools to accomplish this. Jun 13, 2017 at 11:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.