1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

remove more jquery and unneeded components

This commit is contained in:
Luke Pulverenti 2016-05-28 17:48:34 -04:00
parent 9abecac88b
commit 728f77be94
210 changed files with 569 additions and 32746 deletions

View file

@ -534,6 +534,11 @@
self.openWebSocket();
};
function replaceAll(originalString, strReplace, strWith) {
var reg = new RegExp(strReplace, 'ig');
return originalString.replace(reg, strWith);
}
self.openWebSocket = function () {
var accessToken = self.accessToken();
@ -542,7 +547,10 @@
throw new Error("Cannot open web socket without access token.");
}
var url = self.getUrl("socket").replace("emby/socket", "embywebsocket").replace('http', 'ws');
var url = self.getUrl("socket");
url = replaceAll(url, 'emby/socket', 'embywebsocket');
url = replaceAll(url, 'http', 'ws');
url += "?api_key=" + accessToken;
url += "&deviceId=" + deviceId;