Added function for javascript files to be added to pages