I am developing a chrome extention that do some action on page load for example alert welcome
I am using Jquery to dect the document.ready it works perfect with all sites but facebook and google I need it works with FB
here is the manifest.json file
{
"name": "Me",
"version": "1.0",
"manifest_version": 2,
"description": "ME",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"permissions": [
"http://api.flickr.com/"
],
"content_scripts": [
{
"matches": ["http://*/*"],
"js": ["jquery.js", "popup.js"]
}
]
}
and here is pop.js
jQuery(document).ready(function () {
console.log("Welcome");
alert("Welcome");
});
and even I don’t use Jquery and used the JS method directly still doesnt work
alert("Welcome");
You may have HTTPS enabled on Facebook and Google, your content scripts will run on HTTP sites only.
Change your “matches” field value to “<all_urls>” to include HTTPS sites.