mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-17 05:15:21 +03:00
save last tab regardless of connection state
This commit is contained in:
parent
1488f1c6c0
commit
f71dcb9c3c
2 changed files with 8 additions and 8 deletions
|
@ -86,19 +86,19 @@ function startProcess() {
|
|||
return;
|
||||
}
|
||||
|
||||
$("#tabs ul.mode-connected li").click(function() {
|
||||
// store the first class of the current tab (omit things like ".active")
|
||||
chrome.storage.local.set({
|
||||
lastTab: $(this).attr("class").split(' ')[0]
|
||||
});
|
||||
});
|
||||
|
||||
GUI.tab_switch_in_progress = true;
|
||||
|
||||
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');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue