cleaning up

10.3.x-maintenance
cTn 2013-06-19 13:55:20 +02:00
parent a42a464d1f
commit d27660492e
2 changed files with 5 additions and 5 deletions

View File

@ -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.');
});
}

View File

@ -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();