- Mar 22, 2013
- 9,145
- 10,489
I need to add some code to a webpage when a certain text appears on it.
So I load a webpage, and this appears:
I don't want anything to happen. But at some point this appears:
When the text appears, I want to Greasemonkey to add this somewhere on the page.
I don't care where this appears, it doesn't need to be appended to anything, it doesn't even need to be visible on the page. I just want it to appear somewhere in the HTML of the webpage.
Any help?
So I load a webpage, and this appears:
Code:
<div id="someid" class="someclass" style=""></div>
I don't want anything to happen. But at some point this appears:
Code:
<div id="someid" class="someclass" style="">Some text here...</div>
When the text appears, I want to Greasemonkey to add this somewhere on the page.
Code:
<div id="idbla">This is text...</div>
I don't care where this appears, it doesn't need to be appended to anything, it doesn't even need to be visible on the page. I just want it to appear somewhere in the HTML of the webpage.
Any help?