I would like to check the page for the word “testing”, also I would like to check the URL. So for example if you’re on site.com/tester that’s fine, but if you’re on site.com/testing javascript would know. Would you do this with document hostname?
Real world example: Pretty much I just want to create a greasemonkey script to search a page to search a page/url for a username “exgirlfriend” and if “exgirlfriend” is found anywhere on the page document.body.innerHTML= ”
How would I do this?
Here’s something that searches both the innerHTML and the URL for your word.
http://jsfiddle.net/vfbzc/