Make root_url in various js scripts host agnostic