added: bookmarks list in command palette
This commit is contained in:
parent
3ffacd309d
commit
d065c41686
11
main.js
11
main.js
|
@ -1673,6 +1673,13 @@ function commandpalette()
|
||||||
text: s,
|
text: s,
|
||||||
suffix: s == "password" ? null : [settings[s]]
|
suffix: s == "password" ? null : [settings[s]]
|
||||||
};
|
};
|
||||||
|
}))
|
||||||
|
.concat(JSON.parse((getnote("bookmarks") || {content: "[]"}).content).map(b =>
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
prefix: "open bookmark ",
|
||||||
|
text: b.title
|
||||||
|
};
|
||||||
})))
|
})))
|
||||||
.then(selected =>
|
.then(selected =>
|
||||||
{
|
{
|
||||||
|
@ -1690,6 +1697,10 @@ function commandpalette()
|
||||||
{
|
{
|
||||||
editsetting(selected.text);
|
editsetting(selected.text);
|
||||||
}
|
}
|
||||||
|
else if (selected.prefix == "open bookmark ")
|
||||||
|
{
|
||||||
|
window.open(JSON.parse(getnote("bookmarks").content).find(b => b.title == selected.text).url, "_blank");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var command = commands.find(c => c.hint == selected.text);
|
var command = commands.find(c => c.hint == selected.text);
|
||||||
|
|
Loading…
Reference in New Issue