Javascript stuff for use in cdn