User:Xiong Chiamiov/censor.js

//remember, do something about http://en.wikipedia.org/w/index.php?title=Foo&redirect=no

var a = new Array; a[0] = "one"; a[1] = "two"; a[2] = "three"; a[3] = "Foo";

var list = a.join(" ");

var title = location.pathname; //alert(title); var title = title.split("/"); //alert(title[2]);

//var title2 = document.getElementsByTagName('h1')[0].firstChild.nodeValue; //alert(title2); var myH1Array = document.getElementsByTagName("h1"); var myElem = myH1Array.item[0]; //alert(myElem);

//var test = "blah/blah"; //var test2 = test.split("/"); //alert(test2[0]);

var bad = list.indexOf(title[2]);

if(bad != -1) { window.location="http://en.wikipedia.org/wiki/User:Xiong Chiamiov/blocked"; }