Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Favicons of extension's pages in the tree view #202

Open
Procyon-b opened this issue Mar 6, 2020 · 5 comments
Open

Favicons of extension's pages in the tree view #202

Procyon-b opened this issue Mar 6, 2020 · 5 comments
Assignees
Labels
enhancement target-chrome Chrome-specific issues visuals Appearance, branding

Comments

@Procyon-b
Copy link
Contributor

Apparently, chrome gives access to favicons of extensions. I haven't found any documentation, but by analysing the bookmark manager's source code, I came upon this url scheme:

for TF: chrome://favicon/size/16@1x/chrome-extension://hbajjpcdbninabigakflkhiogmmjaakm
for tampermonkey: chrome://favicon/size/16@1x/chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo

You can change the size by modifying the number in the url.
They also play with 1x 2x.

I've manually tested by using the url directly in the source code of TF's window. It works.

@cxw42 cxw42 added enhancement help wanted target-chrome Chrome-specific issues visuals Appearance, branding labels Mar 9, 2020
@cxw42
Copy link
Owner

cxw42 commented May 5, 2020

Merging into #196

@cxw42 cxw42 closed this as completed May 5, 2020
@cxw42 cxw42 removed the help wanted label May 5, 2020
@cxw42 cxw42 changed the title Favicons of extension's pages in the tree view [See #196] Favicons of extension's pages in the tree view May 5, 2020
cxw42 added a commit that referenced this issue May 5, 2020
- Use Chrome itself as the source for chrome-extension favicons
- Add an advanced option to select the site, Chrome, or DDG as the
  favicon source.
@cxw42
Copy link
Owner

cxw42 commented May 5, 2020

master now has an initial version of this feature.

Reopening, though, because it turns out Tampermonkey's icons are data:, so I don't need to pull them from Chrome. Any other extensions you have found that don't show icons in the tree but that you wish did?

Edit What I am really asking for is a conventional bug report. What steps did you take, what did you see, and what did you want to see instead? I am not convinced I completely understand your original post. Thanks!

@cxw42 cxw42 reopened this May 5, 2020
@cxw42 cxw42 changed the title [See #196] Favicons of extension's pages in the tree view Favicons of extension's pages in the tree view May 5, 2020
@cxw42 cxw42 self-assigned this May 5, 2020
@Procyon-b
Copy link
Contributor Author

Procyon-b commented May 5, 2020

Here is what extensions' tabs look like right now. Edit: (in v0.2.1)

TF extensions favicons

uBlock is special, TF tries to use chrome-extension://cjpalhdlnbpafiamejdnhcphjbkeiagm/img/icon_16.png which is forbidden by chrome. Hence the black icon (no img)

Chrome has a special url scheme to allow access to favicon. It supports accessing other extensions favicons.

Here is what it looks like:
TF extensions favicons preview

This is manually edited by adding styles to the elements.
The only thing to do is prefix the url of the page with chrome://favicon/size/16@1x/ and use it in url(""). Not even necessary to remove the rest of the extension path after the extension's id.

To be clear, here are the five favicons in the order of the image

chrome://favicon/size/16@1x/chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo
chrome://favicon/size/16@1x/chrome-extension://lfakeapmadmnkglfmneoeggojcifebha
chrome://favicon/size/16@1x/chrome-extension://oglbhaepiihmmmaipmglkfhbaahhbkec
chrome://favicon/size/16@1x/chrome-extension://clngdbkpkpeebahjckkjfobafhncgmne
chrome://favicon/size/16@1x/chrome-extension://cjpalhdlnbpafiamejdnhcphjbkeiagm

So, when encountering a tab with a URL starting with chrome-extension://, TF can use/find the correct favicon by prefixing the tab's url with this specific scheme.

@cxw42 cxw42 added this to the Release candidate milestone Dec 12, 2020
@cxw42
Copy link
Owner

cxw42 commented Dec 14, 2022

Current code released with v0.3.0 --- please let me know how it's working for you!

@cxw42 cxw42 removed this from the Release candidate milestone Dec 14, 2022
@Procyon-b
Copy link
Contributor Author

Sorry. I don't see the extensions' icons in the list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement target-chrome Chrome-specific issues visuals Appearance, branding
Projects
None yet
Development

No branches or pull requests

2 participants