I'm looking for a Firefox add-on that can detect or monitor a webpage for certain text or words and redirect to another predetermined page if found.

So basically, when someone surfs the web, and they stumble upon a site that contains a particular text or phrase, such as "enemy", the extension will pick up on that and redirect to another page, say example.com.

| improve this question | | | | |
  • I don't really understand what you want. You want to detect text and when you see this text, instead of displaying the page, you want to display a different page? Can you explain what it's for? Is it for an internet filter / Net Nanny? – Mark Byers Dec 28 '09 at 1:27
  • ok. the thing is like this. when someone surf the web, suddenly stumble upon a site that contains a particular text. then, the firefox extension will detect the text and redirect to other preset page. – karikari Dec 28 '09 at 2:30
  • 1
    I fail to see how this idea can end well. – Brian Postow May 12 '10 at 21:45

Compile following javascript in greasemonkey compiler here - http://arantius.com/misc/greasemonkey/script-compiler, you will get firefox extension, and when you install it, it will redirect to google.com when the text "ENEMY" is in the innerHTML. modify those depends on your needs.

// ==UserScript==
// @name           test
// @namespace      test
// @include        *
// ==/UserScript==

(function check(){
    t=setTimeout(check,500); //check every 500 ms
| improve this answer | | | | |
  • This question was migrated from Stack Overflow, but looking at your answer (pure code) makes me thinking, if it actually shouldn't be migrated back there! :> Great answer anyway! – trejder Nov 29 '15 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy