1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-24 16:55:24 +03:00

Added support for ChromeOS.

This commit is contained in:
mikeller 2017-12-04 23:03:35 +13:00
parent 357b6c0998
commit b15a391113
2 changed files with 44 additions and 16 deletions

29
main.js
View file

@ -28,7 +28,9 @@ $(document).ready(function () {
break;
}
checkForConfiguratorUpdates();
if (GUI.operating_system !== 'ChromeOS') {
checkForConfiguratorUpdates();
}
chrome.storage.local.get('logopen', function (result) {
if (result.logopen) {
@ -202,20 +204,23 @@ $(document).ready(function () {
}).change();
});
chrome.storage.local.get('checkForConfiguratorUnstableVersions', function (result) {
$('div.checkForConfiguratorUnstableVersions input').change(function () {
var checked = $(this).is(':checked');
if (GUI.operating_system !== 'ChromeOS') {
chrome.storage.local.get('checkForConfiguratorUnstableVersions', function (result) {
if (result.checkForConfiguratorUnstableVersions) {
$('div.checkForConfiguratorUnstableVersions input').prop('checked', true);
}
chrome.storage.local.set({'checkForConfiguratorUnstableVersions': checked});
$('div.checkForConfiguratorUnstableVersions input').change(function () {
var checked = $(this).is(':checked');
$('input[name="checkForConfiguratorUnstableVersions"]').prop('checked', checked).change();
checkForConfiguratorUpdates();
chrome.storage.local.set({'checkForConfiguratorUnstableVersions': checked});
checkForConfiguratorUpdates();
});
});
if (result.checkForConfiguratorUnstableVersions) {
$('div.checkForConfiguratorUnstableVersions input').prop('checked', true);
}
});
} else {
$('div.checkForConfiguratorUnstableVersions').hide();
}
function close_and_cleanup(e) {
if (e.type == 'click' && !$.contains($('div#options-window')[0], e.target) || e.type == 'keyup' && e.keyCode == 27) {