From d27660492eecce12f850be74bc3fe069ffb6cfbe Mon Sep 17 00:00:00 2001 From: cTn Date: Wed, 19 Jun 2013 13:55:20 +0200 Subject: [PATCH] cleaning up --- background.js | 2 +- js/main.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/background.js b/background.js index 9b9b13fd94..0a418ff2ed 100644 --- a/background.js +++ b/background.js @@ -11,7 +11,7 @@ chrome.app.runtime.onLaunched.addListener(function() { // connectionId is passed from the script side through the chrome.runtime.getBackgroundPage refference // allowing us to automatically close the port when application shut down if (connectionId != -1) { - chrome.serial.close(connectionId, function(){ + chrome.serial.close(connectionId, function() { console.log('CLEANUP: Connection to serial port was opened after application closed, closing the connection.'); }); } diff --git a/js/main.js b/js/main.js index e5fcec7c31..4a187b3851 100644 --- a/js/main.js +++ b/js/main.js @@ -10,10 +10,10 @@ chrome.runtime.getBackgroundPage(function(result) { // OS detection var OS = "Unknown"; -if (navigator.appVersion.indexOf("Win") != -1) OS = "Windows"; -if (navigator.appVersion.indexOf("Mac") != -1) OS = "MacOS"; -if (navigator.appVersion.indexOf("X11") != -1) OS = "UNIX"; -if (navigator.appVersion.indexOf("Linux") != -1) OS = "Linux"; +if (navigator.appVersion.indexOf("Win") != -1) OS = "Windows"; +else if (navigator.appVersion.indexOf("Mac") != -1) OS = "MacOS"; +else if (navigator.appVersion.indexOf("X11") != -1) OS = "UNIX"; +else if (navigator.appVersion.indexOf("Linux") != -1) OS = "Linux"; var timers = new Array();