Fannon / search-bookmarks-history-and-tabs

Browser extension to search and navigate browser tabs, local bookmarks and history.
MIT License
172 stars 8 forks source link

Favicons needed #118

Open N3C2L opened 1 month ago

N3C2L commented 1 month ago

Hello Simon,

Thank you for this add-on!

In an older post you mentioned the possibility to add favicons to search result items: https://github.com/Fannon/search-bookmarks-history-and-tabs/discussions/53#discussioncomment-3322894

I'd love to have favicons be displayed in the search results.

These 3 addons have the favicons implemented on search, but I'd be glad if you could implement it for your addon someday?

https://github.com/mbnuqw/sidebery https://github.com/madprops/grasshopper https://github.com/aaFn/Bookmark-search-plus-2

Edit: I have overlooked this thread: https://github.com/Fannon/search-bookmarks-history-and-tabs/issues/59 But maybe these repositories from above give you some inspirations for implementing it?

Fannon commented 1 month ago

Hi @N3C2L ,

I agree, it would really be a nice addition. If I remember right, the problem was not so much that this isn't possible, but that it works differently for browsers. The examples you sent, are all Firefox specific extensions. This extension here is built in a way that it works for all kind of different browsers (Chrome, Firefox, Edge, Opera, ...).

It doesn't mean that it's not possible to implement this feature, just that it may be more effort. Last time I tried, I also had an issue that the feature how to do that wasn't even properly documented on the browsers side.

N3C2L commented 1 month ago

I understand. I am not a dev, but madprops, the dev of the grasshopper plugin said, that he uses google favicon urls to retrieve the favicons. He said the other two extensions saving images to local storage for the favicons. Maybe some of these solutions can be used for other browsers as well, but I don't know.

Fannon commented 1 month ago

yeah, problem is - I'm not sure if I can introduce that without introducing a new permission, which would not be so nice for the upgrade. But I just didn't find enough time to figure those things out.

Here a while ago I started trying it out, but got stuck on some point: https://github.com/Fannon/search-bookmarks-history-and-tabs/pull/62

Fannon commented 1 month ago

Hm, interesting: https://github.com/aaFn/Bookmark-search-plus-2/blob/master/sidebar/favicon.js

This looks not trivial and is happening in a background worker. This extension does not do any background tasks, so I'm not sure if I want to change that. I'll have to think about it.

N3C2L commented 1 month ago

Thanks for considering adding favicons in the future! May I ask you some additional thing to my observations?

  1. In the search result page the keys for pageup+pagedown have no function. This would be nice to have options for next/prev page actions.
  2. I'd love to change some more CSS (for example tab height, position or hiding some things) to the appearance. Is it possible to use your JSON/YAML option for changing existing CSS which is not listed already here: https://github.com/Fannon/search-bookmarks-history-and-tabs/blob/main/popup/js/model/options.js ?
Fannon commented 1 month ago

1): Good point, I haven't thought about that, but this is reasonable to add. Would you expect that it scrolls the entire visible page? 2) Unfortunately that's not so easy or at least I fear that this would lead to "flickering". The CSS of the extension loads very early, together with the extension. Later the JavaScript runs. So if the options change the CSS via JavaScript it would change the layout while or after it has been rendered. Not really sure if it's a problem or not.

If you really want to change the CSS and you feel up to it, you could download this repository source code, follow the developer installation steps, build the extension with your CSS adjustments. Then you can load it in your browsers as a local extension in dev mode and customize as much as you like.