| Author | Alachuckthebuck |
|---|---|
| Status | Beta |
| Updated | May 4, 2026 (48 days ago) |
| Source | User:Alachuckthebuck/piawordcount.js |
| GitHub repository | piawordcounter.js |
PIA Word Counter is a user script that helps editors quickly count words and estimate prose length while working on PIA-related pages. It is intended to reduce manual counting, make review work faster, and provide consistent word-count information directly on-wiki.
Installation
editAdd the following line to your common.js page:
mw.loader.load('/w/index.php?title=User:Alachuckthebuck/piawordcounter.js&action=raw&ctype=text/javascript');
After saving, bypass your browser cache. On most browsers, this can be done with:
- Windows/Linux: Ctrl + F5
- Mac: ⌘ Command + Shift + R
What it does
editPIA WordCounter adds tools for quickly checking word counts without leaving the page. Depending on the page and available content, it may help count:
- article prose;
- selected text;
- relevant review text;
- sections used during PIA review;
- word totals useful for determining whether a page meets review expectations.
The script is designed as a helper. Editors should still use judgment when applying policies, guidelines, or review criteria.
How to use
edit- Install the script in your common.js page.
- Open a page where the word counter is useful.
- Use the PIA WordCounter button or interface added by the script.
- Review the displayed word count.
- Use the result as supporting information during review.
Notes and limitations
edit- The word count is intended to be a practical estimate, not an official measurement.
- Templates, references, tables, captions, lists, and hidden markup may be treated differently depending on how the page is structured.
- The script may not work correctly on every namespace or page layout.
- If the count seems wrong, check the article manually before relying on it.
- The script does not replace editorial review or consensus.
Troubleshooting
editIf the script does not appear:
- Make sure the installation line was added to common.js.
- Check that the page was saved successfully.
- Bypass your browser cache.
- Make sure JavaScript is enabled.
- Check your browser console for errors.
- Try disabling other user scripts temporarily to check for conflicts.
If the script appears but gives an incorrect count, report the page where the issue happened and describe what number you expected.
Reporting bugs or requesting features
editPlease report bugs, problems, or feature requests on my talk page.
When reporting a bug, include:
- the page where the problem happened;
- what you clicked or selected;
- what result the script gave;
- what result you expected;
- any browser console error, if available.