export filename control
This commit is contained in:
parent
aa1053452c
commit
81f1e6d116
1 changed files with 5 additions and 5 deletions
|
|
@ -465,11 +465,11 @@ var gs_kiri_init = exports;
|
||||||
}
|
}
|
||||||
|
|
||||||
function settingsExport() {
|
function settingsExport() {
|
||||||
if (!confirm('Download Kiri:Moto Settings?')) return;
|
let name = WIN.prompt("Download Settings Filename", "kiriconf");
|
||||||
let json = API.conf.export();
|
if (!name) return;
|
||||||
let blob = new Blob([json], {type: "octet/stream"});
|
let json = API.conf.export(),
|
||||||
let url = WIN.URL.createObjectURL(blob);
|
url = WIN.URL.createObjectURL(new Blob([json], {type: "octet/stream"}));
|
||||||
$('help').innerHTML = `<a id="sexport" href="${url}" download="kiriconf.b64">x</a>`;
|
$('help').innerHTML = `<a id="sexport" href="${url}" download="${name}.b64">x</a>`;
|
||||||
$('sexport').click();
|
$('sexport').click();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue