我希望通过Google Chrome扩展程序发送通知 的清单
{
"name": "Test",
"description": "Test",
"version": "1.1",
"background": {
"scripts": ["background.js"]
},
"permissions": [
"tabs", "http://*/*", "https://*/*",
"notifications"
],
"browser_action": {
"default_title": "Test",
"default_icon": "test_16x16.png"
},
"manifest_version": 2
}
background.js
chrome.browserAction.onClicked.addListener(function() {
chrome.notifications.create(
'name-for-notification',{
type: 'basic',
iconUrl: 'image.jpeg',
title: "This is a notification",
message: "hello there!"
},
function() {}
);
});]
为什么不起作用?