How to use preloaded javascript in query library