mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 11:28:23 -07:00
30 lines
614 B
JavaScript
30 lines
614 B
JavaScript
define(function () {
|
|
|
|
var importedFiles = [];
|
|
|
|
return {
|
|
|
|
load: function (url, req, load, config) {
|
|
|
|
if (url.indexOf('http') != 0 && url.indexOf('file:') != 0) {
|
|
url = config.baseUrl + url;
|
|
}
|
|
|
|
url = url + "?" + config.urlArgs;
|
|
|
|
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);
|
|
}
|
|
};
|
|
});
|