mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
client side code webstorm code cleanup.
This commit is contained in:
@@ -1,28 +1,25 @@
|
||||
//try to add ajax data as query string to DELETE calls.
|
||||
(function (){
|
||||
(function () {
|
||||
|
||||
var original = Backbone.ajax;
|
||||
|
||||
Backbone.ajax = function (){
|
||||
Backbone.ajax = function () {
|
||||
|
||||
var xhr = arguments[0];
|
||||
|
||||
//check if ajax call was made with data option
|
||||
if(xhr && xhr.data && xhr.type=='DELETE')
|
||||
{
|
||||
if(xhr.url.indexOf('?') === -1)
|
||||
{
|
||||
if (xhr && xhr.data && xhr.type == 'DELETE') {
|
||||
if (xhr.url.indexOf('?') === -1) {
|
||||
xhr.url = xhr.url + '?' + $.param(xhr.data);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
xhr.url = xhr.url + '&' + $.param(xhr.data);
|
||||
}
|
||||
}
|
||||
|
||||
if (original){
|
||||
original.apply (this, arguments);
|
||||
if (original) {
|
||||
original.apply(this, arguments);
|
||||
}
|
||||
|
||||
};
|
||||
} ());
|
||||
}());
|
Reference in New Issue
Block a user