Skip to content

Commit

Permalink
fix some formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
gniezen committed Mar 19, 2024
1 parent ce6ea8d commit 0da1630
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
4 changes: 2 additions & 2 deletions app/reducers/devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,15 @@ const devices = {
enabled: {mac: true, win: true, linux: true}
},
onetouchselect: {
instructions: i18n.t('Plug in meter with micro-USB and make sure Uploader Helper extension is installed'),
instructions: i18n.t('Plug in meter with micro-USB cable and make sure Uploader Helper extension is installed'),
name: 'OneTouch Select Plus Flex',
key: 'onetouchselect',
source: {type: 'device', driverId: 'OneTouchSelect'},
enabled: {linux: false, mac: false, win: true},
powerOnlyWarning: true,
},
onetouchverio: {
instructions: i18n.t('Plug in meter with micro-USB and make sure Uploader Helper extension is installed'),
instructions: i18n.t('Plug in meter with micro-USB cable and make sure Uploader Helper extension is installed'),
name: 'OneTouch Verio, Verio Flex and Verio Reflect',
key: 'onetouchverio',
source: {type: 'device', driverId: 'OneTouchVerio'},
Expand Down
24 changes: 11 additions & 13 deletions extension/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ function sendNativeMessage(message) {
}

function onNativeMessage(message) {
if (message.msgType == 'info') {
if (message.msgType == 'info') {
console.log(message.details);
} else {
reply(message);
}
reply(message);
}
}

function onDisconnected() {
Expand All @@ -45,22 +45,20 @@ function onDisconnected() {
reply({ msgType: 'error', details: 'Disconnected: ' + chrome.runtime.lastError.message });
}

chrome.runtime.onMessageExternal.addListener(
function(request, sender, sendResponse) {
chrome.runtime.onMessageExternal.addListener(function(request, sender, sendResponse) {
console.log('Received message from the web page:', request);

if (!port) {
connect();
connect();
}

// Process the request here
if (port) {
sendNativeMessage(request);
sendNativeMessage(request);

reply = sendResponse;
return true; // indicates we will asynchronously use sendResponse
} else {
sendResponse({ msgType: 'error', details: 'Not connected.'});
}
reply = sendResponse;
return true; // indicates we will asynchronously use sendResponse
} else {
sendResponse({ msgType: 'error', details: 'Not connected.'});
}
}
);

0 comments on commit 0da1630

Please sign in to comment.