make worker path detection more robust

This commit is contained in:
Fabian Jakobs 2011-08-04 12:12:03 +02:00
commit 1f7045732e

View file

@ -104,7 +104,7 @@ var WorkerClient = function(topLevelNamespaces, packagedJs, module, classname) {
this.$normalizePath = function(path) { this.$normalizePath = function(path) {
if (!path.match(/^\w+:/)) if (!path.match(/^\w+:/))
path = location.protocol + "//" + location.host + location.pathname + "/" + path; path = location.protocol + "//" + location.host + location.pathname.replace(/\/.*?$/, "/") + "/" + path;
return path; return path;
}; };