Chrome extension for dynamic iFrame access

I am trying to use a script with a very simple google chrome extension that removes a specific div of a particular website. However, this particular div is part of the dynamically displayed iFrame on this page, so I cannot access the element.

I tried using "all_frames" = true in my json manifest, but that did not affect. After researching, I found out that this is because the iFrame is dynamically displayed on the website. I have no background pages, since I don’t want to communicate at all, just delete.

How can I (without using setTmeout) load dynamic text?

+1
source share
1 answer

If β€œstill in the DOM, but effectively gone,” comes close enough to your needs, you can implement this with CSS; just use a selector that will match the div and apply display: none; and it will be hidden whenever it is added.

In fact, if your extension can be implemented this way, you might be better off writing it as a custom style instead of a Chrome extension. http://userstyles.org/help contains information about this.

0
source

All Articles