Source code

Revision control

Copy as Markdown

Other Tools

buildSiblingPath = function(hostPrefix, relativePath, newPort) {
var port = newPort ? newPort : document.location.port;
var path = document.location.pathname.substring(0, document.location.pathname.lastIndexOf('/') + 1);
return (document.location.protocol + '//' + hostPrefix + "." + document.location.hostname + ':' + port + path + relativePath);
};