cleaning up
parent
a42a464d1f
commit
d27660492e
|
@ -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.');
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue