move string.Replace extension

This commit is contained in:
Luke Pulverenti 2015-01-17 15:12:02 -05:00
parent 248c09b642
commit 54f736af62

View File

@ -230,15 +230,9 @@
return deferred.promise();
}
function replaceServerAddress(url, newBaseUrl) {
function replaceServerAddress(url, oldBaseUrl, newBaseUrl) {
var index = url.toLowerCase().indexOf("/mediabrowser");
if (index != -1) {
return newBaseUrl + url.substring(index);
}
return url;
return url.replace(oldBaseUrl, newBaseUrl);
}
self.ajaxWithFailover = function (request, deferred, enableReconnection, replaceUrl) {