How to mask unwanted words in site?

I know a little bit of JS Codding but I have no idea how to mask words or numbers for selected site? For www.examplecode.exm
Containing words: sh*t or pe*. I don't want see those words. How can I make .js file which changes those words into for ex. Flower and water? Or 100 into 50? They won't change sites content but only my clientside browser's perception to those words!

I just need some ideas and suggestions?
http://w3schools.com/jsref/default.asp

Something like this?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var badWords = ["some", "bad", "words"];
var goodWords = ["other", "replacement", "ones"];

function mask( node ) {
    if( node.innerHTML )
        for( var i = 0; i < badWords.length; i++ ) {
            var p = new RegExp( "\b" + badWords[i] + "\b", "g" );
            node.innerHTML = node.innerHTML.replace( p, goodWords[i] );
        }
    for( var i = 0; i < node.childNodes.length; i++ )
        mask( node.childNodes[i] );
}

mask( document.body );


(This is a C++ forum by the way...)
Just remember:
"The Net interprets censorship as damage and routes around it." - John Gilmore.


Are your going to block every gif, jpg and avi? Don't get me wrong, I see the appeal to doing this. It could be absolute garbage and not work 90% of the time, you'd still sell a copy to every parent in the Mid-west. You just have to be careful with the sales pitch.
The down side of this is that on Allegro.cc they have that in effect and it censors all words in appropriate and displays a gif image of comic like curses. Problem is that it blocks the word bastard so even something harmless like "Bastard Sword" gets censored.
Topic archived. No new replies allowed.