From a606c8a4ef413d28b30b652cab884c157d06c77b Mon Sep 17 00:00:00 2001 From: Pelle ten Cate Date: Sat, 14 Jan 2023 12:30:02 +0100 Subject: [PATCH] fix: procedurally find the bookmarks bar title --- src/main.imba | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.imba b/src/main.imba index 19b9e58..12d4486 100644 --- a/src/main.imba +++ b/src/main.imba @@ -38,7 +38,10 @@ def init Frequencies = frequencies or {} global.chrome.bookmarks.getTree! do(bookmarks) - const folder = api.bfs 'Bookmarks Bar', bookmarks + # Bookmarks Bar folder is guaranteed to be the first child of the bookmarks tree root + const bookmarkBarTitle = bookmarks[0].children[0].title + + const folder = api.bfs bookmarkBarTitle, bookmarks state.links = api.traverse folder api.sort_links! state.loaded = yes