manifest.js
{
"manifest_version": 2,
"name": "My Test Extension",
"description": "This extension demonstrates.",
"version": "1.0",
"browser_action": {
"default_icon" :"GB-19.png"
},
"icons": {
"128": "GB-128.png",
"16": "GB-19.png",
"48": "GB-48.png"
},
"background": {
"scripts": ["background.js"]
},
"permissions": [
"tabs",
"activeTab",
"http://*/*",
"https://*/*"
]
}
background.js
chrome.browserAction.onClicked.addListener(function (tab){
chrome.browserAction.setPopup({"tabId": tab.Id,"popup":"Login.html"});
});
而不是Login.html如果我尝试点击任何其他网址(我的应用托管 url)
例如https://www.facebook.com/弹出显示未找到的文件。 注意:我想通过Chrome扩展程序弹出我的托管应用程序(标签一在我的最后工作正常)