Typo No More

By Raffles Last update Nov 10, 2009 — Installed 350 times.

Script Summary: Corrects common typos as you type.



Version: 0.2

Script homepage

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.

If you use any of JavaScript's reserved words (scroll to the bottom) the script will probably break. Don't use those.

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