Open MatthiasGrandl opened 3 years ago
Totally understand you, it's much nicer with an icon. There's a method "query" which is pretty flexible on the input, but fixed on the output:
function queryTabsOnSuccess(tabs) {
tabs.sort(compareWindowIdTabId);
let lines = tabs.map(tab => `${tab.windowId}.${tab.id}\t${tab.title}\t${tab.url}`)
console.log(lines);
port.postMessage(lines);
}
I think it would be reasonable to return the whole tab as a JSON string here from browser back to mediator, and eventually to the client, and then the client could decide how to format it, including showing the raw json, which you could use to grab favIconUrl
.
Just stumbled across this extension. It's (almost) exactly what I need! The only thing that is missing is the ability to list favicons, so I can display them in Rofi/Wofi, as it would make things a little easier to parse. Is that possible? I think there is a way to get a data url from the tabs API, but it has been a while since I looked into this.