Uncensor The Internet Plus

By FinalDoom Last update Oct 15, 2007 — Installed 978 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 10 posts, 6 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
nathaniel_hi... Scriptwright

Great script, however I noticed that it doesn't take into account underscores. ( _ )
sh_t!

 
CaCtUs2003 Scriptwright

F*ck This F***ing Script! I f*cking hate this god d@mn sh*t!!!

Lol, I don't really hate it. Just testing the script, b*tch! :)

 
bobielawlintine Scriptwright

Bug: "motherboards" gets incorrectly changed to "motherfuckds" which itself is spelled wrong.

 
Descriptor Scriptwright

Maybe not as hard as you think, you just need to work on the uncensor() function, pass it the node instead of node.data.
I may come up with a way to do this myself using W3C methods that I've been reading here...
http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-...

 
FinalDoom Script's Author

I don't deserve most of the credit. I just fixed all the regexp stuff and cleaned up the overall functions. The basic structure is mostly the original author's.
I changed the true false thing, but not the version, since it is so minor. At some point, I'll probably find more to add to it, but I'm busy right now.

I was going to add custom formatting for the uncensored words, like on my updated linkifier script, but the way the prior author had the script finding and replacing words makes it impossible, and I couldn't figure out how to rewrite it to do what I wanted easily.

 
Descriptor Scriptwright

0/1 is only shorthand for true/false, though I use 0/1 sometimes like in Perl, logic circuits are literally true/false, not numbers and 1 is definitely a number not literally equal to true.
(pagerization = 1) evaluates to true because it is defined, it could be defined as anything except 0, null undefined or false. The problems happen because 0 is actually a number, but in this script it doesn't matter, except that this script is so perfect otherwise.

Good job this script is impressive, I didn't even know text nodes had a "data" property, so I learned a few things.

 
FinalDoom Script's Author

Woops. Yeah, I have it as 1 on my box so I must have just forgotten to set it back last time. I figured 0 and 1 make more sense ( that's all boolean true false is essentially ) but true false is probably more correct.

 
Descriptor Scriptwright

I noticed that
var pagerization = 1;
in the script, but you state that it is set to 0.

Also, it might be better to use true or false since you are checking for boolean and 1 is a number not exclusively true, or I should say the number 0 is not exclusively false.
Either way, whatever you prefer, I just think true/false makes more sense.

 
FinalDoom Script's Author

It may be a little slower or a little faster than the original; I'm not sure. I know it does more, and I took out some unneeded parts, but couldn't rewrite the entire function structure. Javascript isn't a language I know really well.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel