Adds baseurl to JS for generic templating