Add support for URL prefix in JS code