Get button clicked with chrome extension
问题 I want to know how to detect if a button with a certain id is clicked on a webpage with my chrome extension. With my code I have an error saying that my element is undefined. Here is my manifest : { "manifest_version": 2, "name": "app", "description": "my app", "version": "1.0", "browser_action": { "default_icon": "icon.png", "default_popup": "popup.html", "default_title": "Changer le background" }, "permissions": [ "activeTab", "storage" ] } And my popup.js file : document.addEventListener(