mercredi 28 décembre 2016

How to include html file in a content_script of chrome Extension?

I am creating a chrome extension.I have a small extension which includes css,javascript and html file. I want to run this extension on any web page but content script allows me to run only script file and when i add css html file extension doesn't work. It doesn't show html page that i create for extension except for script.js.So please help me how can i add html file in content_script.

This is my manifest.json file: {

"manifest_version":2,

"name":"News Plugin",
"description": "This extension will show you the latest news with headlines and small description",
"version":"1.0",


"browser_action":{
"default_icon":"news_icon.png",
"default_popup":"NewsApp.html"
},
//"chrome_url_overrides":{
//"newtab":"NewsApp.html"
//},

"content_scripts":[
    {
        "matches":["http://*/*","https://*/*"],
        "js":["news.js"],
        "html":["news.js"],
        "css":["style.js"]
    }
],

"permissions":[
"activeTab"
]

}




Aucun commentaire:

Enregistrer un commentaire