I want to execute another function when a button on a website is clicked. I wonder to know if this is possible with chrome extension functionality and is this ethical to make and it’s good to know that the code that I execute with my extension has many additions to the same website code?
Share
To do this just add an event listener to the element you try to manipulate in your content script:
Also don’t forget to add this content script to your
manifest.jsonIf it fits the purpose of the extension it’s ethical of course, therefore we have JavaScript :).