PageAction: init in config, storage and background click listener
This commit is contained in:
parent
ff775a9c7d
commit
75b40ece52
|
@ -20,5 +20,10 @@
|
|||
"browser_action": {
|
||||
"default_icon": "resources/icons/icon-24.png",
|
||||
"default_title": "Share"
|
||||
},
|
||||
"page_action": {
|
||||
"browser_style": false,
|
||||
"default_icon": "resources/icons/icon-24.png",
|
||||
"default_title": "Share"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,4 +30,8 @@ function shareCurrentTab(tab) {
|
|||
});
|
||||
}
|
||||
|
||||
/*
|
||||
Listeners
|
||||
*/
|
||||
browser.browserAction.onClicked.addListener(shareCurrentTab);
|
||||
browser.pageAction.onClicked.addListener(shareCurrentTab);
|
||||
|
|
|
@ -3,6 +3,7 @@ Default settings. Initialize storage to these values.
|
|||
*/
|
||||
var storage = {
|
||||
url: '',
|
||||
pageAction: false,
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue