Greasemonkey help - how to insert space?

Scorpion Ghost

Elite Member
Executive VIP
Jr. VIP
Joined
Mar 22, 2013
Messages
9,143
Reaction score
10,489
I have this on Greasemonkey:

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?
 
I tried this <SP> and this &nbsp;

Just to show you how much of a noob I am :D

But anyway I found a solution to what I wanted to accomplish, so never mind.
 
Back
Top