// ==UserScript==
// @name           Harry Potter Protector
// @namespace      http://theradiantcity.com/harry/
// @include        *
// @exclude		http://www.theradiantcity.com/*
// @exclude		http://theradiantcity.com/*
// @exclude		http://tavrn.com/*
// @exclude		http://www.tavrn.com/*
// @exclude 	http://pagead2.googlesyndication.com/*
// @exclude		http://digg.com/movies/Protect_yourself_from_Harry_Potter_spoilers
// @exclude		http://alltid.org/*
// @description    Protect yourself from malicious Harry Potter spoilers
// ==/UserScript==

 var word = new Array("Harry", "Potter", "Hermione", "Ron", "Dumbledore", "Luna", "Deathly", "Hallows");

 var body = document.body.innerHTML
 var i = 0

 for (i = 0; i < (word.length); i++) {
	
    var w = new RegExp( word[i], "g" )
    var x = body.search(w);

    if (x != -1) {
	    
	    var newBody = 
			'<html>' +
			'<head>' +
			'<title>Harry Potter!</title>' +
			'</head>' +
			'<body>' +
			'<p>This page contains Deathly words of doom!!</p>' +
			'</body>' +
			'</html>';
		
		document.body.innerHTML = newBody
	     break;
	}

 }