Clean up functions in global scope

This commit is contained in:
Chocobo1
2024-02-08 12:03:10 +08:00
parent 9b64d50660
commit f7e9ff0fb0
24 changed files with 294 additions and 270 deletions

View File

@@ -56,7 +56,7 @@ window.qBittorrent.PropPeers = (function() {
syncTorrentPeersLastResponseId = 0;
torrentPeersTable.clear();
clearTimeout(loadTorrentPeersTimer);
loadTorrentPeersTimer = loadTorrentPeersData.delay(getSyncMainDataInterval());
loadTorrentPeersTimer = loadTorrentPeersData.delay(window.qBittorrent.Client.getSyncMainDataInterval());
return;
}
const url = new URI('api/v2/sync/torrentPeers');
@@ -68,7 +68,7 @@ window.qBittorrent.PropPeers = (function() {
method: 'get',
onComplete: function() {
clearTimeout(loadTorrentPeersTimer);
loadTorrentPeersTimer = loadTorrentPeersData.delay(getSyncMainDataInterval());
loadTorrentPeersTimer = loadTorrentPeersData.delay(window.qBittorrent.Client.getSyncMainDataInterval());
},
onSuccess: function(response) {
$('error_div').set('html', '');