- jmh9072
- |
- Exalted Mythic Member
Posted by: RyanThePerson
Okay, I edited the Translate Script, and it seems to be working. It will not work if the post begins with an acronym, followed directly by punctuation, but that isn't very common. Words like "target" are no longer effected. Sorry about editing your script, PKF_647, I had nothing to do. :D
Download: hereUsing the StringTokenizer class would be a better way to go. It divides the text into tokens (words), based on specified delimeters (in this case, spaces and punctuation). Those tokens are then tested against the list of words to replace.
EDIT: Grr, that's Java, not Javascript. The javascript equivalent is the split method. I think I'll have a go at this.
EDIT2: I'm too tired to figure out why this isn't working properly right now. I'll pick it up later.
[Edited on 03.28.2009 8:26 PM PDT]