我是Google Chrome浏览器扩展程序的新手,我为我们的网站创建了一个用于检查您所在页面的内容,并基于此获取服务器的ID(我们有拥有4台虚拟机的webfarm)。现在使用服务器ID,我不想更改扩展名图标以在那里显示数字。我已经尝试使用:更改Chrome浏览器扩展程序图标
chrome.browserAction.setIcon({
path : folder + icons[2],
tabId: tab.id
});
但我发现了这个错误:chrome.browserAction is not available: You do not have permission to access this API. Ensure that the required permission or manifest property is included in your manifest.json.
我试着用搜索引擎的错误,并已通过文件搜索,但找不到是什么原因造成这...
你有没有定义'browser_action'在你的清单中?在你的清单中遗漏的是我能想到的唯一一件事会导致这样的错误(除了使用canary/dev/beta版本的浏览器外)。 – apsillers
' “browser_action”:{ “default_icon”: “数字/ 1green.png”, “default_popup”: “index.html的” }' 就是我.. – Richard
我在我的 “正常” 的尝试Chrome在开发模式和加纳利 – Richard