2

I understand that popups are made up of a html file. Below is my code. For some reason the popup window won't open when I click the icon. Any ideas on what the problem may be?

{
    "name": "Popup Snake",
    "version": "1.0",
    "description": "A simple snake game popup, that can be opened by clicking the icon in the top right (after installing)",
    "page_action": {
      "default_popup": "popup.html"
    },
    "manifest_version": 2
}
Cindy Meister
  • 25,071
  • 21
  • 34
  • 43
Kris10an
  • 548
  • 3
  • 23

2 Answers2

6

Try changing page_action to browser_action So like this:

{
"name": "Popup Snake",
"version": "1.0",
"description": "A simple snake game popup, that can be opened by clicking the icon in the top right (after installing)",
"browser_action": {
  "default_popup": "popup.html"
},
"manifest_version": 2

}

carduque
  • 188
  • 1
  • 14
0

I've had this problem as well. But instead of changing it to browser_action, i instead kept the page_action. see declarativeContent

The thing I've heard is, browser_action should only be used if your extension use features that make sense on most pages. Else use page action.

Source: What are the differences between page action and browser action?

So with page_action, you specify what website your extension would work on with said declarativeContent.