- Mar 22, 2013
- 9,143
- 10,489
I have this on Greasemonkey:
So if the word "TEXT" is found on the page, a popup box appears that says "Found it!"
How can I make the code work if I wanted 2 words, like so:
Between TEXT and TWO I have to put something to connect the words, right? How to do it?
Code:
if (/TEXT/i.test (document.body.innerHTML) )
{
alert ("Found it!");
}
So if the word "TEXT" is found on the page, a popup box appears that says "Found it!"
How can I make the code work if I wanted 2 words, like so:
Code:
if (/TEXT TWO/i.test (document.body.innerHTML) )
{
alert ("Found it!");
}
Between TEXT and TWO I have to put something to connect the words, right? How to do it?