I am failing to get a trivial page_action to work in Edge. It becomes active, but does not pop up popup html the same way a browser action does.
mainifest.json
{
"manifest_version" : 2,
"name": "Page action",
"version": "0.1",
"description": "Hello World",
"page_action": {
"default_icon": "icon16.png",
"default_title": "PageActioner",
"default_popup": "popup.html"
},
"background": {
"scripts": ["background.js"]
}
}
background.js
console.log("This goes nowhere would be good to get working.");
chrome.tabs.query({currentWindow: true, active: false}, function(tabs) {
chrome.pageAction.show(tabs[0].id); // Colored in first tab, hacky but works
});
// This can work, but should not be needed and pops up in the wrong place
// let winUrl = chrome.extension.getURL("popup.html");
// chrome.pageAction.onClicked.addListener(function (tab) {
// let wd=window.open(winUrl, "_blank", width=500,height=200,left=1,top=1,location=1");
// });
Could there be a permission problem? Is there a way to say all_permissions while developing? (I am side loading this from a file.)
Also, console.log() seems to disappear, but alerts seem to work.
Any help appreciated.