There should be a central configuration option (preference or similar) where an admin can specify JavaScript libraries to be automatically available in all Text Areas. Not only gives this the ability to easily add new capabilities for custom scripts, there will also be a central location to update libraries without having to update each analysis file.