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:
parent
9abecac88b
commit
728f77be94
210 changed files with 569 additions and 32746 deletions
|
@ -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;
|
||||
|
|
|
@ -582,12 +582,12 @@
|
|||
"X-MediaBrowser-Token": server.AccessToken
|
||||
}
|
||||
|
||||
}).then(function(user) {
|
||||
}).then(function (user) {
|
||||
|
||||
onLocalUserSignIn(server, connectionMode, user);
|
||||
return Promise.resolve();
|
||||
|
||||
}, function() {
|
||||
}, function () {
|
||||
|
||||
server.UserId = null;
|
||||
server.AccessToken = null;
|
||||
|
@ -1188,6 +1188,11 @@
|
|||
Events.trigger(self, 'connected', [result]);
|
||||
}
|
||||
|
||||
function replaceAll(originalString, strReplace, strWith) {
|
||||
var reg = new RegExp(strReplace, 'ig');
|
||||
return originalString.replace(reg, strWith);
|
||||
}
|
||||
|
||||
function normalizeAddress(address) {
|
||||
|
||||
// attempt to correct bad input
|
||||
|
@ -1198,8 +1203,8 @@
|
|||
}
|
||||
|
||||
// Seeing failures in iOS when protocol isn't lowercase
|
||||
address = address.replace('Http:', 'http:');
|
||||
address = address.replace('Https:', 'https:');
|
||||
address = replaceAll(address, 'Http:', 'http:');
|
||||
address = replaceAll(address, 'Https:', 'https:');
|
||||
|
||||
return address;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue