From d065c41686e0b680a7442347559c36b732b92bdb Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Mon, 8 Jan 2024 11:46:38 +0100 Subject: [PATCH] added: bookmarks list in command palette --- main.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/main.js b/main.js index bb4271a..809f19a 100644 --- a/main.js +++ b/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);