Thanks for the reply Pyro, i managed to get something working but i have a feeling it quite bloated way of doing it...
http://pastebin.com/m7d942a29 The above links to the code snippet that i created, it checks a URL that returns either "match" or "null" depending if it finds a match for the selected text and then depending on the results changes the styling of the element. I have a funny feeling im not doing it the best way possible but then im very bad at JS :D