You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
757 B
26 lines
757 B
define(function () {
|
|
'use strict';
|
|
return {
|
|
load: function (name, parentRequire, onload, config) {
|
|
|
|
if(config.isBuild){
|
|
return onload();
|
|
}
|
|
|
|
var resource = name.split('!')[0];
|
|
var url = window.NzbDrone.ApiRoot + '/' + resource;
|
|
|
|
$.ajax({
|
|
url: url
|
|
}).done(function (data) {
|
|
onload(data);
|
|
}).error(function (xhr, status, error) {
|
|
onload.error({
|
|
xhr : xhr,
|
|
status: status,
|
|
error : error});
|
|
});
|
|
}
|
|
};
|
|
});
|