Typo No More

By Raffles Last update May 27, 2008 — Installed 80 times.
Script Summary:
Corrects common typos as you type.
Recently Updated TopicsPosts
Archived Comments5

this script has 1 topic, 5 posts

This script has no reviews.

It works on textareas and checks the last word you typed and checks it against a list of words commonly mistyped. The list is currently this:

var words = {
  'accomadation': 'accommodation',
  'accomadate': 'accommodate',
  'accomodate': 'accommodate',
  'agressive': 'aggressive',
  'apparantly': 'apparently',
  'seperate': 'separate',
  'definately': 'definitely',
  'definatly': 'definitely',
  'definetly': 'definitely',
  'definetely': 'definitely',
  'definately': 'definitely',
  'defanately': 'definitely',
  'genious': 'genius',
  'intellegent': 'intelligent'
};

It is quite limited because I can't be bothered to find out what people can't spell properly and because the whole idea is that you add words that you know you often mistype.

The script will correct words in three cases:

  • after you have typed a word and then typed a punctuation character;
  • when you edit a word that is already followed by a punctuation character.
  • when the textarea loses focus. In this case, the last word only is checked and only if the last character isn't a punctuation character.

Punctuation characters marking the end of a word: ':!?.,";)/ and the space and newline characters (i.e. pressing Enter).

Punctuation characters marking the start of a word: '"(/ and the space and newline characters.

Please note that I haven't created this because I can't spell.