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,
|
||||
suffix: s == "password" ? null : [settings[s]]
|
||||
};
|
||||
}))
|
||||
.concat(JSON.parse((getnote("bookmarks") || {content: "[]"}).content).map(b =>
|
||||
{
|
||||
return {
|
||||
prefix: "open bookmark ",
|
||||
text: b.title
|
||||
};
|
||||
})))
|
||||
.then(selected =>
|
||||
{
|
||||
|
@ -1690,6 +1697,10 @@ function commandpalette()
|
|||
{
|
||||
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
|
||||
{
|
||||
var command = commands.find(c => c.hint == selected.text);
|
||||
|
|
Loading…
Reference in New Issue