From 7fb1e07b392aadf0ad5137a865a688b3296ce686 Mon Sep 17 00:00:00 2001 From: Vasiliy Halimonchuk Date: Thu, 30 May 2019 00:06:55 +0300 Subject: [PATCH] Remove unused variables --- src/webui/www/private/scripts/prop-files.js | 2 -- src/webui/www/private/scripts/speedslider.js | 20 ++++++++------------ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/webui/www/private/scripts/prop-files.js b/src/webui/www/private/scripts/prop-files.js index 69e1a62d2..b3b648967 100644 --- a/src/webui/www/private/scripts/prop-files.js +++ b/src/webui/www/private/scripts/prop-files.js @@ -346,8 +346,6 @@ const torrentFilesContextMenu = new ContextMenu({ y: 2 }, onShow: function() { - var selectedRows = torrentFilesTable.selectedRowsIds(); - if (is_seed) this.hideItem('FilePrio'); else diff --git a/src/webui/www/private/scripts/speedslider.js b/src/webui/www/private/scripts/speedslider.js index 4dec6b75b..32797a83d 100644 --- a/src/webui/www/private/scripts/speedslider.js +++ b/src/webui/www/private/scripts/speedslider.js @@ -31,11 +31,9 @@ MochaUI.extend({ addUpLimitSlider: function(hashes) { if ($('uplimitSliderarea')) { - const windowOptions = MochaUI.Windows.windowOptions; - const sliderFirst = true; // Get global upload limit let maximum = 500; - const req = new Request({ + new Request({ url: 'api/v2/transfer/uploadLimit', method: 'post', data: {}, @@ -58,7 +56,7 @@ MochaUI.extend({ let up_limit = maximum; if (up_limit < 0) up_limit = 0; maximum = 10000; - const mochaSlide = new Slider($('uplimitSliderarea'), $('uplimitSliderknob'), { + new Slider($('uplimitSliderarea'), $('uplimitSliderknob'), { steps: maximum, offset: 0, initialStep: up_limit.round(), @@ -84,7 +82,7 @@ MochaUI.extend({ } } else { - const req = new Request.JSON({ + new Request.JSON({ url: 'api/v2/torrents/uploadLimit', noCache : true, method: 'post', @@ -100,7 +98,7 @@ MochaUI.extend({ break; } if (up_limit < 0) up_limit = 0; - const mochaSlide = new Slider($('uplimitSliderarea'), $('uplimitSliderknob'), { + new Slider($('uplimitSliderarea'), $('uplimitSliderknob'), { steps: maximum, offset: 0, initialStep: (up_limit / 1024.0).round(), @@ -135,11 +133,9 @@ MochaUI.extend({ addDlLimitSlider: function(hashes) { if ($('dllimitSliderarea')) { - const windowOptions = MochaUI.Windows.windowOptions; - const sliderFirst = true; // Get global upload limit let maximum = 500; - const req = new Request({ + new Request({ url: 'api/v2/transfer/downloadLimit', method: 'post', data: {}, @@ -162,7 +158,7 @@ MochaUI.extend({ let dl_limit = maximum; if (dl_limit < 0) dl_limit = 0; maximum = 10000; - const mochaSlide = new Slider($('dllimitSliderarea'), $('dllimitSliderknob'), { + new Slider($('dllimitSliderarea'), $('dllimitSliderknob'), { steps: maximum, offset: 0, initialStep: dl_limit.round(), @@ -188,7 +184,7 @@ MochaUI.extend({ } } else { - const req = new Request.JSON({ + new Request.JSON({ url: 'api/v2/torrents/downloadLimit', noCache : true, method: 'post', @@ -204,7 +200,7 @@ MochaUI.extend({ break; } if (dl_limit < 0) dl_limit = 0; - const mochaSlide = new Slider($('dllimitSliderarea'), $('dllimitSliderknob'), { + new Slider($('dllimitSliderarea'), $('dllimitSliderknob'), { steps: maximum, offset: 0, initialStep: (dl_limit / 1024.0).round(),