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- Open your common.js file and click Edit Source (or Create if the page is blank).
- Add the following to the beginning or the end of the file:
// [[User:Caorongjin/wordcount]] importScript('User:Caorongjin/wordcount.js');
- Save your changes.
Sample output
editWord counts (doc):
- Main body: 7894 words
- References: 2702 words
- Total: 10596 words
What does it count?
editThe 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?
editTo discuss this script and any features you would like to see added, please go to the script's talk page.