Google extension Chrome shows no default popup

Asked

Viewed 53 times

0

I started yesterday developing extensions for google Chrome, and followed how google sends:

I declared my manifesto and added the popup page:

{
    "name": "ODM Integration",
    "description": "Open Download Manager integration for google chrome",
    "version": "1.0",
    "manifest_version": 2,
    "default_locale": "en_US",
    "author": "Samuel Ives",

    "browser_action":{
        "default_popup": "popup.html"
    },

    "permissions":[
        "pageCapture"
    ]
}

Html page:

<!DOCTYPE html>

<html>
    <head>
        <title>ODM Integration<title>
        <meta charset = "UTF-8" />
    </head>
    <body>
        <h1>Files</h1>
    </body>
</html>

but what it returns when I click on the extension is a square of 12 x 12 pixels blank.

1 answer

2


First problem, to use

 "default_locale": "en_US"

it is necessary to have the folder _locales, the second problem is that you did not close the title tag:

 <title>ODM Integration<title>

The HTML is being generated like this:

erro no html

That is, everything being considered text, the correct would be:

 <title>ODM Integration</title>

Whole HTML:

<!DOCTYPE html>
<html>
    <head>
        <title>ODM Integration</title>
        <meta charset = "UTF-8" />
    </head>
    <body>
        <h1>Files</h1>
    </body>
</html>
  • I hadn’t really noticed the title tag had not feichado the title tag, this is due to the custom of sublime text automatically open and feichar tags, square brackets etc... but I already have a folder called _locales and inside I have en_US and pt_BR both with messages.json. Just feichei the tag and it worked perfectly.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.