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

Migrate chrome storage API to window.localStorage

Add remove function

Remove callback from set and remove

Rebased

Rebased
This commit is contained in:
Mark Haslinghuis 2021-10-18 01:45:30 +02:00
parent c86348b4db
commit f41e135333
17 changed files with 597 additions and 636 deletions

View file

@ -389,13 +389,12 @@ GuiControl.prototype.content_ready = function (callback) {
};
GuiControl.prototype.selectDefaultTabWhenConnected = function() {
ConfigStorage.get(['rememberLastTab', 'lastTab'], function (result) {
if (result.rememberLastTab && result.lastTab) {
$(`#tabs ul.mode-connected .${result.lastTab} a`).click();
} else {
$('#tabs ul.mode-connected .tab_setup a').click();
}
});
const result = ConfigStorage.get(['rememberLastTab', 'lastTab']);
if (result.rememberLastTab && result.lastTab) {
$(`#tabs ul.mode-connected .${result.lastTab} a`).click();
} else {
$('#tabs ul.mode-connected .tab_setup a').click();
}
};
GuiControl.prototype.isNWJS = function () {