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

allow user to pick any type of file to load in CLI

This commit is contained in:
Károly Kiripolszky 2019-04-29 10:34:10 +02:00
parent 0458198e9a
commit 6062d76ed3

View file

@ -203,10 +203,14 @@ TABS.cli.initialize = function (callback, nwGui) {
}
$('.tab-cli .load').click(function() {
var suffix = 'txt',
accepts = [{
description: suffix.toUpperCase() + ' files', extensions: [suffix],
}];
var accepts = [
{
description: 'Config files', extensions: ["txt", "config"],
},
{
description: 'All files',
},
];
chrome.fileSystem.chooseEntry({type: 'openFile', accepts: accepts}, function(entry) {
if (chrome.runtime.lastError) {