Answer the question
In order to leave comments, you need to log in
How to write an extension so that it changes the JS code on the site?
There is a site. There are a lot of pop-ups. I wrote an extension for opera. In the code, when you click on the extension icon, I wrote the JS code that removes these windows. But it doesn't work. I decided to write alert(window.location) in the code.
It shows me that I'm on some kind of "background_page" although I'm on another site.
What to do?
Answer the question
In order to leave comments, you need to log in
You are executing your code in the wrong place
https://developer.chrome.com/extensions/content_scripts
UPD: https://dev.opera.com/extensions/content-scripts/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question