diff --git a/js/port_handler.js b/js/port_handler.js old mode 100644 new mode 100755 index e37d0d76..fe2e9610 --- a/js/port_handler.js +++ b/js/port_handler.js @@ -1,12 +1,10 @@ 'use strict'; var PortHandler = new function () { - this.main_timeout_reference; this.initial_ports = false; - this.port_detected_callbacks = []; this.port_removed_callbacks = []; -} +}; PortHandler.initialize = function () { // start listening, check after 250ms @@ -137,7 +135,7 @@ PortHandler.check = function () { check_usb_devices(); } - self.main_timeout_reference = setTimeout(function () { + setTimeout(function () { self.check(); }, 250); }); @@ -161,13 +159,11 @@ PortHandler.check = function () { PortHandler.update_port_select = function (ports) { $('div#port-picker #port').html(''); // drop previous one - if (ports.length > 0) { - for (var i = 0; i < ports.length; i++) { - $('div#port-picker #port').append($("