parent
672e1bd9ed
commit
e0dd72328c
@ -1,46 +0,0 @@
|
||||
var $ = require('jquery');
|
||||
//var vent = require('../vent');
|
||||
//var messenger = require('../Shared/Messenger');
|
||||
|
||||
var original = $.ajax;
|
||||
$.ajax = function(xhr){
|
||||
'use strict';
|
||||
if(xhr && xhr.data && xhr.type === 'DELETE') {
|
||||
if(xhr.url.contains('?')) {
|
||||
xhr.url += '&';
|
||||
}
|
||||
else {
|
||||
xhr.url += '?';
|
||||
}
|
||||
xhr.url += $.param(xhr.data);
|
||||
delete xhr.data;
|
||||
}
|
||||
if(xhr) {
|
||||
xhr.headers = xhr.headers || {};
|
||||
xhr.headers['X-Api-Key'] = window.NzbDrone.ApiKey;
|
||||
}
|
||||
return original.apply(this, arguments);
|
||||
/* .done(function (response, status, xhr) {
|
||||
var version = xhr.getResponseHeader('X-ApplicationVersion');
|
||||
if (!window.NzbDrone || !window.NzbDrone.Version) {
|
||||
return;
|
||||
}
|
||||
if (version !== window.NzbDrone.Version) {
|
||||
var vent = require('../vent');
|
||||
var messenger = require('../Shared/Messenger');
|
||||
if (!vent || !messenger) {
|
||||
return;
|
||||
}
|
||||
messenger.show({
|
||||
message : 'Sonarr has been updated', hideAfter : 0, id : 'droneUpdated', actions : {
|
||||
viewChanges : {
|
||||
label : 'View Changes', action : function () {
|
||||
window.location = window.NzbDrone.UrlBase + '/system/updates';
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
vent.trigger(vent.Events.ServerUpdated);
|
||||
}
|
||||
});*/
|
||||
};
|
@ -1,9 +1,7 @@
|
||||
require('jquery');
|
||||
require('../JsLibraries/backbone');
|
||||
|
||||
var jquery = require('jquery');
|
||||
|
||||
var backbone = require('../JsLibraries/backbone');
|
||||
window.Backbone = backbone;
|
||||
backbone.$ = jquery;
|
||||
|
||||
window.Backbone = backbone;
|
||||
module.exports = backbone;
|
@ -1,8 +1,11 @@
|
||||
require('../JsLibraries/jquery');
|
||||
require('../Instrumentation/StringFormat');
|
||||
|
||||
var jquery = require('../JsLibraries/jquery');
|
||||
require('../Instrumentation/StringFormat');
|
||||
var spin = require('../jQuery/jquery.spin');
|
||||
var ajax = require('../jquery/jquery.ajax');
|
||||
|
||||
spin.call(jquery);
|
||||
ajax.call(jquery);
|
||||
|
||||
window.$ = jquery;
|
||||
window.jQuery = jquery;
|
||||
module.exports = jquery;
|
@ -0,0 +1,47 @@
|
||||
module.exports = function(){
|
||||
|
||||
var $ = this;
|
||||
|
||||
var original = $.ajax;
|
||||
$.ajax = function(xhr){
|
||||
'use strict';
|
||||
if(xhr && xhr.data && xhr.type === 'DELETE') {
|
||||
if(xhr.url.contains('?')) {
|
||||
xhr.url += '&';
|
||||
}
|
||||
else {
|
||||
xhr.url += '?';
|
||||
}
|
||||
xhr.url += $.param(xhr.data);
|
||||
delete xhr.data;
|
||||
}
|
||||
if(xhr) {
|
||||
xhr.headers = xhr.headers || {};
|
||||
xhr.headers['X-Api-Key'] = window.NzbDrone.ApiKey;
|
||||
}
|
||||
return original.apply(this, arguments);
|
||||
/* .done(function (response, status, xhr) {
|
||||
var version = xhr.getResponseHeader('X-ApplicationVersion');
|
||||
if (!window.NzbDrone || !window.NzbDrone.Version) {
|
||||
return;
|
||||
}
|
||||
if (version !== window.NzbDrone.Version) {
|
||||
var vent = require('../vent');
|
||||
var messenger = require('../Shared/Messenger');
|
||||
if (!vent || !messenger) {
|
||||
return;
|
||||
}
|
||||
messenger.show({
|
||||
message : 'Sonarr has been updated', hideAfter : 0, id : 'droneUpdated', actions : {
|
||||
viewChanges : {
|
||||
label : 'View Changes', action : function () {
|
||||
window.location = window.NzbDrone.UrlBase + '/system/updates';
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
vent.trigger(vent.Events.ServerUpdated);
|
||||
}
|
||||
});*/
|
||||
};
|
||||
};
|
@ -1,11 +0,0 @@
|
||||
'use strict';
|
||||
if(window.NzbDrone.Analytics) {
|
||||
var d = document;
|
||||
var g = d.createElement('script');
|
||||
var s = d.getElementsByTagName('script')[0];
|
||||
g.type = 'text/javascript';
|
||||
g.async = true;
|
||||
g.defer = true;
|
||||
g.src = 'http://piwik.nzbdrone.com/piwik.js';
|
||||
s.parentNode.insertBefore(g, s);
|
||||
}
|
Loading…
Reference in new issue