#5944: Unify indentation style and strip trailing whitespaces across JS code, no functional changes (patch by xzcvczx + a lot more)

This commit is contained in:
Mike Gelfand
2015-05-05 19:12:48 +00:00
parent 5de8bbe6d8
commit 7177d43ba1
11 changed files with 1180 additions and 1178 deletions

View File

@@ -54,8 +54,8 @@ TransmissionRemote.prototype =
}
remote._error = request.responseText
? request.responseText.trim().replace(/(<([^>]+)>)/ig,"")
: "";
? request.responseText.trim().replace(/(<([^>]+)>)/ig,"")
: "";
if (!remote._error.length)
remote._error = 'Server not responding';
@@ -101,17 +101,20 @@ TransmissionRemote.prototype =
var o = { method: 'session-get' };
this.sendRequest(o, callback, context, async);
},
checkPort: function(callback, context, async) {
var o = { method: 'port-test' };
this.sendRequest(o, callback, context, async);
},
renameTorrent: function(torrentIds, oldpath, newname, callback, context) {
var o = { method: 'torrent-rename-path',
arguments: { 'ids': torrentIds,
'path': oldpath,
'name': newname }
var o = {
method: 'torrent-rename-path',
arguments: {
'ids': torrentIds,
'path': oldpath,
'name': newname
}
};
this.sendRequest(o, callback, context);
},
@@ -124,7 +127,7 @@ TransmissionRemote.prototype =
updateTorrents: function(torrentIds, fields, callback, context) {
var o = {
method: 'torrent-get',
'arguments': {
arguments: {
'fields': fields
}
};
@@ -184,7 +187,7 @@ TransmissionRemote.prototype =
moveTorrents: function(torrent_ids, new_location, callback, context) {
var remote = this;
this.sendTorrentSetRequests( 'torrent-set-location', torrent_ids,
this.sendTorrentSetRequests( 'torrent-set-location', torrent_ids,
{"move": true, "location": new_location}, callback, context);
},