Merge branch 'main' into feat/colors
This commit is contained in:
commit
aa19c9d890
19
main.js
19
main.js
|
@ -261,6 +261,10 @@ var commands = [
|
|||
hint: "Settings",
|
||||
action: editsettings
|
||||
},
|
||||
{
|
||||
hint: "Change a setting",
|
||||
action: changesetting
|
||||
},
|
||||
{
|
||||
hint: "Restore default settings",
|
||||
action: restoresettings
|
||||
|
@ -936,6 +940,21 @@ function editsettings()
|
|||
});
|
||||
}
|
||||
|
||||
function changesetting()
|
||||
{
|
||||
searchinlist(Object.keys(settings).map(name => name + ": " + settings[name]))
|
||||
.then(setting =>
|
||||
{
|
||||
var name = setting.split(":").shift();
|
||||
if (settings[name])
|
||||
{
|
||||
settings[name] = prompt(name, settings[name]);
|
||||
savesettings();
|
||||
loadsettings();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function decryptnote()
|
||||
{
|
||||
decryptstring(md.value)
|
||||
|
|
Loading…
Reference in New Issue