adds functionality for loading a custom script into the template