Jump to content

User:Caorongjin/wordcount

From Wikipedia, the free encyclopedia

This scripts adds a Word count to the list of tools normally found on the left of the Wikipedia screen. The script produces an output of the word count for the main body and the references section, highlighting the counted fields in yellow and cyan, respectively. Clicking the Word count link again toggles these calculations and highlights off.

This script is based on User:Dr pda/prosesize, which limits its calculation to the readable prose and does not include lists such as references.

Installing the script

[edit]
  1. Open your common.js file and click Edit Source (or Create if the page is blank).
  2. Add the following to the beginning or the end of the file:
    // [[User:Caorongjin/wordcount]]
    importScript('User:Caorongjin/wordcount.js');
    
  3. Save your changes.

Sample output

[edit]

Word counts (doc):

  • Main body: 7894 words
  • References: 2702 words
  • Total: 10596 words

What does it count?

[edit]

The goal of the script is to achieve something similar to that which can be calculated in a standard word processor. Some of the key areas it tries to handle include:

Questions?

[edit]

To discuss this script and any features you would like to see added, please go to the script's talk page.

See also

[edit]