| Hello everyone. When I was developing for Office 365 I came across the following challenge. I needed to add some JavaScript functions to each SharePoint Page without writing code or even adjusting the MasterPage. When I start looking into this I found this Blog post from Andrew Connell: http://www.andrewconnell.com/blog/archive/2011/04/11/adding-jquery-to-every-page-in-a-sharepoint.aspx The only thing you need is a Feature with a CustomAction Element. <CustomAction ScriptSrc="~SiteCollection/Style Library/Scripts/jquery-ui-1.8.12.custom.min.js" Location="ScriptLink" Sequence="205"/> ScriptSrc: This is the location of your script file. Location: The control to render the reference to the script file. Works like a delegate control. Sequence: When you need to add more scripts you can determine the sequence for loading. When the Feature is activated the Script is automatically added to the ScriptLink control which is on de MasterPage by default. |