【发布时间】:2016-03-29 20:07:37
【问题描述】:
我正在构建一个覆盖新标签的Chrome Extension。我设法用我的 HTML 文件和页面标题覆盖了新选项卡。但是,favicon 不会显示在新选项卡上,也不会显示任何错误。
这是我的manifest.json:
{
"manifest_version": 2,
"name": "Hello World",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"chrome_url_overrides" : {
"newtab": "hello_world.html"
},
"permissions": [
"activeTab",
"tabs"
]
}
这里是hello_world.html:
<html>
<head>
<title>Hello World</title>
<link rel="shortcut icon" href="favicon.ico"/>
</head>
<body>
<div>Hello World</div>
</body>
</html>
我在 docs 中找不到任何关于新标签页上的网站图标的内容。
【问题讨论】:
-
favicon.ico不应该出现在您的清单文件中吗?
标签: html google-chrome google-chrome-extension favicon