I was reading through some of the recent posts today, and I came across this post. Being as it's reply was the only recent one nearby, it was in bold letters, and everything around it was faded, so it stood out like a sore thumb.

Now, I wouldn't mind so much, but my mom was standing right behind me! (Yes, I'm just a college student living at home for the summer). If you want it more personalized to you, imagine your boss, who takes offense easily, standing right behind you, and if he glances at the screen, hey, just maybe he'll read it.

On the other hand, I also think people should express themselves how they like, I think that's great, and I don't want to put an end to that.

So here's what I'm suggesting. Custom filters. I haven't completely thought through exactly how this would work, but I was thinking that there could be a regex on all of the text of the page to be displayed. I don't think this would slow down the site as a whole, because if a person didn't set any filters, none would run. So, maybe there's a textbox in the personal settings that a person can put in his or her own substitution regexes, new line delimited or soemthing, and they would be run in a for-loop. So, if I wanted to filter out a certain word, I could put in there /word/****/, which would filter out every occurance of 'word'.

Like I said, I don't think it would add too much lag to the site, especially if a person didn't have any set. I don't know how easy it would be to implement though. Well, that's my idea, let me know what you think.

-Bryan

Replies are listed 'Best First'.
Re: Custom Word Filters
by Ovid (Cardinal) on May 19, 2005 at 03:23 UTC
Re: Custom Word Filters (load)
by tye (Sage) on May 19, 2005 at 00:01 UTC

    Someone please write a swear-word-filtering HTTP proxy (he11, there is probably one already written). This type of load should be the burden of the clients who feel the need for it, not a burden shared by the whole audience of this web site, IMO.

    - tye        

Re: Custom Word Filters
by hossman (Prior) on May 19, 2005 at 06:25 UTC

    you could allways add something like this to your Free Nodelet (assuming you enable it in your Nodelet settings, and assuming your browser is forgiving about script blocks in the body)....

    <script> var b = document.getElementsByTagName("body").item(0); b.innerHTML = b.innerHTML.replace( /Ja()va|Ru()by|Pas()cal/ig, "PROFANITY" ); </script>

    Make sure you are very carefull with your regex, or you could make the site entirely unusable, to the point that you might not even be able to use the User Settings page to undo it.

      What's to forgive? <script> elements are allowed in the <body> in HTML (although they do still need a type attribute). The only issue might be with accessing the DOM before the page has finished rendering, but that's easy enough to solve by wrapping it with:
      window.onload = function() { // Your code }

      That's brilliant. Thanks!

      -Bryan