1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/dashboard-ui/bower_components/emby-webcomponents/require/requiretext.js

30 lines
607 B
JavaScript
Raw Normal View History

2016-05-12 22:32:12 -04:00
define(function () {
return {
load: function (url, req, load, config) {
2016-08-28 14:59:14 -04:00
if (url.indexOf('://') == -1) {
2016-05-12 22:32:12 -04:00
url = config.baseUrl + url;
}
2016-05-13 14:28:05 -04:00
if (config.urlArgs) {
url += config.urlArgs(url, url);
}
2016-05-12 22:32:12 -04:00
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);
}
};
});