mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-16 12:55:14 +03:00
Add option to reopen last tab on connect
This commit is contained in:
parent
863708ad94
commit
1488f1c6c0
6 changed files with 41 additions and 3 deletions
|
@ -91,7 +91,14 @@ function startProcess() {
|
|||
GUI.tab_switch_cleanup(function () {
|
||||
// disable previously active tab highlight
|
||||
$('li', ui_tabs).removeClass('active');
|
||||
|
||||
|
||||
// store last active tab only when connected
|
||||
if (GUI.connected_to) {
|
||||
chrome.storage.local.set({
|
||||
lastTab: $(self).parent().attr("class")
|
||||
});
|
||||
}
|
||||
|
||||
// Highlight selected tab
|
||||
$(self).parent().addClass('active');
|
||||
|
||||
|
@ -217,6 +224,13 @@ function startProcess() {
|
|||
}).change();
|
||||
});
|
||||
|
||||
chrome.storage.local.get('rememberLastTab', function (result) {
|
||||
$('div.rememberLastTab input')
|
||||
.prop('checked', !!result.rememberLastTab)
|
||||
.change(function() { chrome.storage.local.set({rememberLastTab: $(this).is(':checked')}) })
|
||||
.change();
|
||||
});
|
||||
|
||||
if (GUI.operating_system !== 'ChromeOS') {
|
||||
chrome.storage.local.get('checkForConfiguratorUnstableVersions', function (result) {
|
||||
if (result.checkForConfiguratorUnstableVersions) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue