Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/iNavFlight/inav-configurator.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Pastor <shellixyz@users.noreply.github.com>2018-12-18 19:12:13 +0300
committerGitHub <noreply@github.com>2018-12-18 19:12:13 +0300
commit10e488a09a26120171b6f3cc58a66748a6dc38a9 (patch)
treeec44ee00da80a2225233bd888bba2d823ab81dd0
parent02388d656fc55557179062c6711b0290e2d982eb (diff)
parent2b97becbab54748db4c46c7c2263eaf07493e95e (diff)
Merge pull request #615 from shellixyz/always_use_the_last_selected_osd_font
Use the last selected font for the OSD preview
-rw-r--r--tabs/osd.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/tabs/osd.js b/tabs/osd.js
index a7355433..b364d7f0 100644
--- a/tabs/osd.js
+++ b/tabs/osd.js
@@ -2028,10 +2028,16 @@ TABS.osd.initialize = function (callback) {
FONT.preview($preview);
OSD.GUI.update();
});
+ chrome.storage.local.set({'osd_font': $(this).data('font-file')});
});
- // load the first font when we change tabs
- $fontPicker.first().click();
+ // load the last selected font when we change tabs
+ chrome.storage.local.get('osd_font', function (result) {
+ if (result.osd_font != undefined)
+ $('.fontbuttons button[data-font-file="' + result.osd_font + '"]').click()
+ else
+ $fontPicker.first().click();
+ });
$('button.load_font_file').click(function () {
$fontPicker.removeClass('active');