From 71b135395c52142c1c6333847dad558bc8271609 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Thu, 26 Mar 2026 12:28:24 -0700 Subject: glide: Reorder options in url picker, show all bookmarks --- glide/.config/glide/glide.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/glide/.config/glide/glide.ts b/glide/.config/glide/glide.ts index 7c6fe36..1c3449f 100644 --- a/glide/.config/glide/glide.ts +++ b/glide/.config/glide/glide.ts @@ -281,21 +281,22 @@ const search_info: Record = { } as const /* -* pick tabs via a selection of bookmarks and history -*/ - + * pick tabs via a selection of bookmarks and history + */ glide.keymaps.set("normal", "t", async () => { //let combined: Array = [] let combined = [] - const bookmarks = await browser.bookmarks.getRecent(20); - bookmarks.forEach(bmark => combined.push({ title: bmark.title, url: bmark.url, type: 'B' })); + const tabs = await browser.tabs.query({}); + tabs.forEach(entry => combined.push({ title: entry.title ?? 'Unnamed Tab', url: entry.url, type: 'T', favIconUrl: entry.favIconUrl })); - const history = await browser.history.search({ text: "", maxResults: 100 }); - history.forEach(entry => combined.push({ title: entry.title, url: entry.url, type: 'H' })); + const bookmarks = await browser.bookmarks.search({}); + bookmarks + .filter(bmark => bmark.type !== 'folder') + .forEach(bmark => combined.push({ title: bmark.title, url: bmark.url, type: 'B', favIconUrl: null })); - const tabs = await browser.tabs.query({}); - tabs.forEach(entry => combined.push({ title: entry.title ?? 'Unnamed Tab', url: entry.url, type: 'T' })); + const history = await browser.history.search({ text: "", maxResults: 100 }); + history.forEach(entry => combined.push({ title: entry.title, url: entry.url, type: 'H', favIconUrl: null })); // filtering const newtab = (await browser.runtime.getManifest()).chrome_url_overrides?.newtab -- cgit v1.3-2-g0d8e