From 83c46db661bf57ebe919338ef2f26668bfa87d5c Mon Sep 17 00:00:00 2001 From: Sam Schloegel Date: Mon, 3 Jan 2022 14:40:10 -0500 Subject: [PATCH] eslint fix spaced-comment errors --- main.js | 4 ++-- plugins/eos/eos.js | 12 ++++++------ plugins/pjlink/pjlink.js | 4 ++-- plugins/qlab/qlab.js | 6 +++--- plugins/watchout/watchout.js | 2 +- plugins/x32/x32.js | 12 ++++++------ plugins/xair/xair.js | 12 ++++++------ preload.js | 8 ++++---- src/device.js | 20 ++++++++++---------- src/index.js | 6 +++--- src/saveSlots.js | 2 +- src/search.js | 18 +++++++++--------- src/view.js | 8 ++++---- 13 files changed, 57 insertions(+), 57 deletions(-) diff --git a/main.js b/main.js index c6f87c5..b612d84 100644 --- a/main.js +++ b/main.js @@ -22,11 +22,11 @@ const createWindow = () => { transparent: true, frame: false, show: false, - //backgroundColor: "#333333", + // backgroundColor: "#333333", vibrancy: 'window', visualEffectState: 'followWindow', webPreferences: { - //enableRemoteModule: true, + // enableRemoteModule: true, contextIsolation: false, nodeIntegration: true, preload: path.join(__dirname, 'preload.js'), diff --git a/plugins/eos/eos.js b/plugins/eos/eos.js index fef62d5..6772e3b 100644 --- a/plugins/eos/eos.js +++ b/plugins/eos/eos.js @@ -13,7 +13,7 @@ exports.searchOptions = { }; exports.defaultPort = 3032; -//"\xc0/eos/ping\x00\x00\x2c\x00\x00\x00\xc0" +// "\xc0/eos/ping\x00\x00\x2c\x00\x00\x00\xc0" exports.ready = function (device) { device.send('/eos/get/cuelist/count'); @@ -90,10 +90,10 @@ exports.data = function (device, osc) { ), }; - //console.log(p[4]+" "+p[5]+" "+p[6]+" updated") + // console.log(p[4]+" "+p[5]+" "+p[6]+" updated") device.draw(); } else if (p[1] == 'out' && p[2] == 'get' && p[3] == 'cue' && p.length == 6) { - //console.log("cue "+p[4]+" "+p[5]+" deleted") + // console.log("cue "+p[4]+" "+p[5]+" deleted") // There's no OSC notification of the deletion of a part. It just tells you to update the parent cue and remaining children. // So: we should fetch all the parts of a cue somehow every time there's an update to a cue. @@ -125,7 +125,7 @@ exports.data = function (device, osc) { var cueNumber = osc.args[1]; device.send(`/eos/get/cue/${cueList}/${cueNumber}`); - //console.log("SENT /eos/get/cue/"+cueList+"/"+cueNumber); + // console.log("SENT /eos/get/cue/"+cueList+"/"+cueNumber); } else if ( p[2] == 'cmd' || p[2] == 'ping' || @@ -135,9 +135,9 @@ exports.data = function (device, osc) { } else if (p[3] == 'version') { device.data.version = osc.args[0]; } else { - //console.log(osc); + // console.log(osc); } - //console.log(p) + // console.log(p) }; exports.heartbeat = function (device) { device.send('/eos/ping'); diff --git a/plugins/pjlink/pjlink.js b/plugins/pjlink/pjlink.js index caa98c2..2f85e28 100644 --- a/plugins/pjlink/pjlink.js +++ b/plugins/pjlink/pjlink.js @@ -13,8 +13,8 @@ exports.searchOptions = { exports.defaultPort = 4352; exports.ready = function (device) { - //Power status query - //device.send("%1POWR ?\r"); + // Power status query + // device.send("%1POWR ?\r"); }; var password = false; diff --git a/plugins/qlab/qlab.js b/plugins/qlab/qlab.js index 0c5014b..45890cd 100644 --- a/plugins/qlab/qlab.js +++ b/plugins/qlab/qlab.js @@ -14,7 +14,7 @@ exports.data = function (device, osc) { var p = osc.address.split('/'); p.shift(); - //console.log(address) + // console.log(address) if (osc.address == '/reply/workspaces') { const d = JSON.parse(osc.args[0]).data; @@ -53,7 +53,7 @@ exports.data = function (device, osc) { for (var cueIndex in group.cues) { var cue = group.cues[cueIndex]; - //console.log(cue) + // console.log(cue) device.data.lastCueInGroup[group.uniqueID] = cue; @@ -81,7 +81,7 @@ exports.data = function (device, osc) { } } - //console.log(device.data.lastCueInGroup) + // console.log(device.data.lastCueInGroup) device.draw(); } else if (p[0] == 'update' && p[1] == 'workspace' && p[3] == 'cue_id') { diff --git a/plugins/watchout/watchout.js b/plugins/watchout/watchout.js index b8e577b..038b389 100644 --- a/plugins/watchout/watchout.js +++ b/plugins/watchout/watchout.js @@ -50,7 +50,7 @@ exports.data = function (device, message) { // if(msg.substring(0, 5)=="Error"){ // device.data.error = msg.substring(6, 7); // } - //console.log(msg) + // console.log(msg) }; exports.heartbeat = function (device) { diff --git a/plugins/x32/x32.js b/plugins/x32/x32.js index c8f8e70..050f49d 100644 --- a/plugins/x32/x32.js +++ b/plugins/x32/x32.js @@ -25,10 +25,10 @@ exports.ready = function (device) { device.send(Buffer.from('/xinfo')); - //device.send(Buffer.from("\x2f\x62\x61\x74\x63\x68\x73\x75\x62\x73\x63\x72\x69\x62\x65\x00\x2c\x73\x73\x69\x69\x69\x00\x00\x6d\x65\x74\x65\x72\x73\x2f\x30\x00\x00\x00\x00\x2f\x6d\x65\x74\x65\x72\x73\x2f\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01")); - //device.send(Buffer.from("/batchsubscribe\x00,ssiii\x00\x00meters/0\x00\x00\x00\x00/meters/0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01")); + // device.send(Buffer.from("\x2f\x62\x61\x74\x63\x68\x73\x75\x62\x73\x63\x72\x69\x62\x65\x00\x2c\x73\x73\x69\x69\x69\x00\x00\x6d\x65\x74\x65\x72\x73\x2f\x30\x00\x00\x00\x00\x2f\x6d\x65\x74\x65\x72\x73\x2f\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01")); + // device.send(Buffer.from("/batchsubscribe\x00,ssiii\x00\x00meters/0\x00\x00\x00\x00/meters/0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01")); - //device.send(Buffer.from("/subscribe\x00,si\x00/-stat/solosw/01\x001")); + // device.send(Buffer.from("/subscribe\x00,si\x00/-stat/solosw/01\x001")); }; exports.data = function (device, buf) { @@ -56,7 +56,7 @@ exports.data = function (device, buf) { } device.draw(); } else if (msg[0] == '/meters/0') { - //console.log(msg) + // console.log(msg) } else if (msg[0].indexOf('/mix/fader') >= 0) { var addr = parseAddress(msg[0]); var channel = Number(addr[1]); @@ -102,9 +102,9 @@ exports.data = function (device, buf) { device.draw(); device.send(Buffer.from(`/ch/${addr[1]}/mix/on\u0000\u0000\u0000\u0000`)); } else { - //console.log(msg) + // console.log(msg) } - //console.log(msg) + // console.log(msg) }; exports.heartbeat = function (device) { diff --git a/plugins/xair/xair.js b/plugins/xair/xair.js index 69f720b..e83faae 100644 --- a/plugins/xair/xair.js +++ b/plugins/xair/xair.js @@ -25,10 +25,10 @@ exports.ready = function (device) { device.send(Buffer.from('/xinfo')); - //device.send(Buffer.from("\x2f\x62\x61\x74\x63\x68\x73\x75\x62\x73\x63\x72\x69\x62\x65\x00\x2c\x73\x73\x69\x69\x69\x00\x00\x6d\x65\x74\x65\x72\x73\x2f\x30\x00\x00\x00\x00\x2f\x6d\x65\x74\x65\x72\x73\x2f\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01")); - //device.send(Buffer.from("/batchsubscribe\x00,ssiii\x00\x00meters/0\x00\x00\x00\x00/meters/0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01")); + // device.send(Buffer.from("\x2f\x62\x61\x74\x63\x68\x73\x75\x62\x73\x63\x72\x69\x62\x65\x00\x2c\x73\x73\x69\x69\x69\x00\x00\x6d\x65\x74\x65\x72\x73\x2f\x30\x00\x00\x00\x00\x2f\x6d\x65\x74\x65\x72\x73\x2f\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01")); + // device.send(Buffer.from("/batchsubscribe\x00,ssiii\x00\x00meters/0\x00\x00\x00\x00/meters/0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01")); - //device.send(Buffer.from("/subscribe\x00,si\x00/-stat/solosw/01\x001")); + // device.send(Buffer.from("/subscribe\x00,si\x00/-stat/solosw/01\x001")); }; exports.data = function (device, buf) { @@ -61,7 +61,7 @@ exports.data = function (device, buf) { } device.draw(); } else if (msg[0] == '/meters/0') { - //console.log(msg) + // console.log(msg) } else if (msg[0].indexOf('/mix/fader') >= 0) { var addr = parseAddress(msg[0]); var channel = Number(addr[1]); @@ -107,9 +107,9 @@ exports.data = function (device, buf) { device.draw(); device.send(Buffer.from(`/ch/${addr[1]}/mix/on\u0000\u0000\u0000\u0000`)); } else { - //console.log(msg) + // console.log(msg) } - //console.log(msg) + // console.log(msg) }; exports.heartbeat = function (device) { diff --git a/preload.js b/preload.js index 57948ef..128b41f 100644 --- a/preload.js +++ b/preload.js @@ -1,6 +1,6 @@ const { remote } = require('electron'); const { ipcRenderer } = require('electron'); -//let currWindow = remote.BrowserWindow.getFocusedWindow(); +// let currWindow = remote.BrowserWindow.getFocusedWindow(); const { v4: uuid } = require('uuid'); let ejs = require('ejs'); @@ -124,14 +124,14 @@ window.init = function () { .classList.remove('active-device'); ipcRenderer.send('disableDeviceDropdown', ''); } catch (err) { - //console.log(err) + // console.log(err) } try { document .getElementsByClassName('active-device-outline')[0] .classList.remove('active-device-outline'); } catch (err) { - //console.log(err) + // console.log(err) } VIEW.switchDevice(); @@ -174,7 +174,7 @@ function switchClass(element, className) { try { document.getElementsByClassName(className)[0].classList.remove(className); } catch (err) { - //console.log(err) + // console.log(err) } element.classList.add(className); } diff --git a/src/device.js b/src/device.js index 3ac7154..95a954c 100644 --- a/src/device.js +++ b/src/device.js @@ -39,7 +39,7 @@ registerDevice = function (newDevice) { } } - //console.log("Registered new "+newDevice.type) + // console.log("Registered new "+newDevice.type) var id = newDevice.id || uuid(); devices[id] = { @@ -92,7 +92,7 @@ initDeviceConnection = function (id) { }); device.connection.open(); device.connection.on('error', function (error) { - //console.error(error) + // console.error(error) device.connection.close(); }); device.connection.on('ready', function () { @@ -102,7 +102,7 @@ initDeviceConnection = function (id) { } }); device.connection.on('message', function (message) { - //log("OSC IN", message.address); + // log("OSC IN", message.address); plugins[type].data(device, message); device.lastMessage = Date.now(); }); @@ -119,7 +119,7 @@ initDeviceConnection = function (id) { ); device.connection.on('error', function (error) { - //console.error(error) + // console.error(error) }); device.connection.on('ready', function () { plugins[type].ready(device); @@ -128,13 +128,13 @@ initDeviceConnection = function (id) { } }); device.connection.on('data', function (message) { - //log("SOCK IN", message); + // log("SOCK IN", message); plugins[type].data(device, message); device.lastMessage = Date.now(); infoUpdate(device, 'status', 'ok'); }); device.send = function (data) { - //log("SOCK OUT", data); + // log("SOCK OUT", data); device.connection.write(data); }; } else if (plugins[type].connectionType == 'UDPsocket') { @@ -155,7 +155,7 @@ initDeviceConnection = function (id) { device.port, device.addresses[0], function (err) { - //console.log(err); + // console.log(err); } ); }; @@ -186,7 +186,7 @@ module.exports.changeActiveType = function (newType) { initDeviceConnection(device.id); VIEW.draw(device); - //SAVESLOTS.saveAll(); + // SAVESLOTS.saveAll(); }; module.exports.changeActiveIP = function (newIP) { @@ -221,7 +221,7 @@ module.exports.changeActivePinIndex = function (newPin) { }; module.exports.changePinIndex = function (device, newPin) { device.pinIndex = newPin; - //SAVESLOTS.saveAll(); + // SAVESLOTS.saveAll(); }; module.exports.refreshActive = function () { var device = VIEW.getActiveDevice(); @@ -255,7 +255,7 @@ function heartbeat() { if (device.port != undefined && device.addresses.length > 0) { PLUGINS.all[device.type].heartbeat(device); } else { - //console.error("Invalid IP/Port on device "+device.name) + // console.error("Invalid IP/Port on device "+device.name) } } device.lastHeartbeat = Date.now(); diff --git a/src/index.js b/src/index.js index 86763a0..b5656ad 100644 --- a/src/index.js +++ b/src/index.js @@ -8,10 +8,10 @@ document.getElementById('search-button').onclick = function (e) { window.searchAll(); }; document.getElementById('add-device-button').onclick = function (e) { - //e.stopPropagation(); - //document.getElementById("add-device-popover").style.display = "block"; + // e.stopPropagation(); + // document.getElementById("add-device-popover").style.display = "block"; }; window.closePopovers = function () { - //document.getElementById("add-device-popover").style.display = "none"; + // document.getElementById("add-device-popover").style.display = "none"; }; diff --git a/src/saveSlots.js b/src/saveSlots.js index fa3a431..29605bd 100644 --- a/src/saveSlots.js +++ b/src/saveSlots.js @@ -28,7 +28,7 @@ loadSlot = function (slotIndex) { var savedDevice = savedSlots[slotIndex][d]; for (var d in DEVICE.all) { var device = DEVICE.all[d]; - //if(device.addresses[0] == savedDevice.addresses[0] && device.type == savedDevice.type){ + // if(device.addresses[0] == savedDevice.addresses[0] && device.type == savedDevice.type){ if (device.id == savedDevice.id) { VIEW.pinDevice(device); VIEW.switchDevice(device.id); diff --git a/src/search.js b/src/search.js index 9c0633d..b0241f4 100644 --- a/src/search.js +++ b/src/search.js @@ -20,7 +20,7 @@ searchAll = function () { searching = true; ipcRenderer.send('disableSearchAll', ''); document.getElementById('search-button').style.opacity = 0.2; - //console.clear(); + // console.clear(); for (var i in DEVICE.all) { DEVICE.infoUpdate(DEVICE.all[i], 'status', 'refresh'); @@ -28,7 +28,7 @@ searchAll = function () { console.log('Searching...'); - //findOnlineDevices(); + // findOnlineDevices(); allServers = getServers(); var TCPFlag = true; if (allServers.length > 2046) { @@ -62,9 +62,9 @@ searchAll = function () { } } - //searchBonjour(); - //searchTCP(); - //searchUDP(); + // searchBonjour(); + // searchTCP(); + // searchUDP(); setTimeout(function () { searching = false; @@ -166,7 +166,7 @@ TCPtest = function (ip, pluginType, plugin) { client.end(); }); client.on('error', function (err) { - //no device here + // no device here }); }; @@ -301,7 +301,7 @@ newSearchUDP = function (pluginType, plugin) { plugin.searchOptions.devicePort, '255.255.255.255', (err) => { - //console.log(err) + // console.log(err) } ); setTimeout(function () { @@ -310,7 +310,7 @@ newSearchUDP = function (pluginType, plugin) { plugin.searchOptions.devicePort, '255.255.255.255', (err) => { - //console.log(err) + // console.log(err) } ); }, 100); @@ -320,7 +320,7 @@ newSearchUDP = function (pluginType, plugin) { plugin.searchOptions.devicePort, '255.255.255.255', (err) => { - //console.log(err) + // console.log(err) } ); }, 400); diff --git a/src/view.js b/src/view.js index 7f6a4be..aa64f79 100644 --- a/src/view.js +++ b/src/view.js @@ -33,7 +33,7 @@ drawDeviceInterface = function (id) { ".css' rel='stylesheet' type='text/css'>"; } - //scrollbar styles are inline to prevent the styles flickering in + // scrollbar styles are inline to prevent the styles flickering in str += '