I'm currently building a chrome extension using React. The problem is, react only runs if I clicked the popup. Also when I tried to modify the page by inserting something, it only shows in popover. Did I missed something? If I tried it in content_script, it works fine. Here's my manifest.json.
"short_name": "Extension", "name": "My Extension", "permissions": ["activeTab", "storage", "tabs", "*://*/*"], "manifest_version": 2, "version": "0.0.1", "browser_action": { "default_popup": "index.html", "default_title": "My Extension" }, "content_scripts": [ { "run_at": "document_idle", "matches": ["http://*/*", "https://*/*"], "js": [ "content_script.js" "static/js/main.js" ] } ], "background": { "scripts": [""background.js"], "persistent": false } }
fyi: static/js/main.js
is a minified file. I modified the webpack so it will stay as main.js.