在newtab页面上显示chrome://favicon/ [英] Displaying chrome://favicon/ on newtab page
问题描述
我正在开发一个 Google Chrome扩展程序,其中书签显示在 newtab 页面上.到目前为止,除收藏夹图标之外,其他所有东西都可以正常工作.
I'm developing a Google Chrome extension where bookmarks are displayed on the newtab page. Everything works fine so far except for the favicons.
在Chrome中输入此URL将显示页面的图标:
Entering this URL in Chrome displays the favicon of a page:
chrome://favicon/ https://stackoverflow.com/
但是,在我正确设置的 newtab 中,它们不会显示.
However, in the newtab, which I properly set up, they don't get displayed.
HTML非常简单,但是:
The HTML is very simple, though:
<img src="chrome://favicon/https://stackoverflow.com/" />
推荐答案
我认为文档中没有它,但是访问chrome://favicon/
需要在清单中具有特殊权限"chrome://favicon/"
.
I don't think it's anywhere in the docs, but accessing chrome://favicon/
needs a special permission "chrome://favicon/"
in the manifest.
请注意:
- This may change in the future.
chrome://favicon
is not entirely reliable.
这篇关于在newtab页面上显示chrome://favicon/的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!