mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-18 22:05:13 +03:00
Fix registering lasttab click more than once
This commit is contained in:
parent
a5b5c7d737
commit
39c6e41744
1 changed files with 7 additions and 7 deletions
|
@ -145,6 +145,13 @@ function startProcess() {
|
||||||
console.log('Libraries: jQuery - ' + $.fn.jquery + ', d3 - ' + d3.version + ', three.js - ' + THREE.REVISION);
|
console.log('Libraries: jQuery - ' + $.fn.jquery + ', d3 - ' + d3.version + ', three.js - ' + THREE.REVISION);
|
||||||
|
|
||||||
// Tabs
|
// Tabs
|
||||||
|
$("#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]
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
var ui_tabs = $('#tabs > ul');
|
var ui_tabs = $('#tabs > ul');
|
||||||
$('a', ui_tabs).click(function () {
|
$('a', ui_tabs).click(function () {
|
||||||
if ($(this).parent().hasClass('active') == false && !GUI.tab_switch_in_progress) { // only initialize when the tab isn't already active
|
if ($(this).parent().hasClass('active') == false && !GUI.tab_switch_in_progress) { // only initialize when the tab isn't already active
|
||||||
|
@ -178,13 +185,6 @@ function startProcess() {
|
||||||
return;
|
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_in_progress = true;
|
||||||
|
|
||||||
GUI.tab_switch_cleanup(function () {
|
GUI.tab_switch_cleanup(function () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue