mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 11:28:23 -07:00
31 lines
626 B
JavaScript
31 lines
626 B
JavaScript
define(function () {
|
|
'use strict';
|
|
|
|
return {
|
|
|
|
load: function (url, req, load, config) {
|
|
|
|
if (url.indexOf('://') === -1) {
|
|
url = config.baseUrl + url;
|
|
}
|
|
|
|
if (config.urlArgs) {
|
|
url += config.urlArgs(url, url);
|
|
}
|
|
|
|
var xhr = new XMLHttpRequest();
|
|
xhr.open('GET', url, true);
|
|
|
|
xhr.onload = function (e) {
|
|
load(this.response);
|
|
};
|
|
|
|
xhr.send();
|
|
},
|
|
|
|
normalize: function (name, normalize) {
|
|
return normalize(name);
|
|
}
|
|
};
|
|
});
|