User:Shahadat/WordCount
![]() | This user script is currently active on Justapedia. This has been verified by an administrator or creator. If there is a problem, please leave a message on its talk page. |
Author(s) | Shahadat |
---|---|
Status | Active |
Updated | March 29, 2023 |
Browser support | all except (maybe) Internet Explorer 11? haven't tested |
Skin support | All skins |
Source | User:Shahadat/WordCount.js |
Instead of a direct insert into the p-cactions
portlet links, it will use the built-in mw.util.addPortletLink
function, fixing the issue where the portlet link no longer appears. In addition, the script will try its best to match any Unicode letter (including letters and characters from other scripts) instead of just Latin alphabet characters (with no accents). Because of this, ことば
, 言語
, 언어
, and بطة
are all counted as words now. Despite this, words still need to be separated by whitespace in order to be counted as a word (so 僕の犬は本当にかわいいですようね~
would be considered one word). Such functionality is only because of newer browser technologies, and the script will automatically fall back to counting plain old Latin letters if the features aren't available (e.g. on very old Internet Explorer versions).
Installation
Manual
- Add the following to Special:MyPage/common.js (or your skin-specific js, if you prefer):
{{subst:iusc|User:Shahadat/WordCount.js}}
Source
The source can be found at Justapedia. The script is licensed under the CC BY-SA 3.0 License.
Discussion
You may visit my talk page if you have any concerns.
Script Attribution
![]() | This script was manually imported from Wikipedia in compliance with their CC-BY-SA license. This script is utilized either partially or in full, incorporating corrections, modifications, or imported from the original script. For details regarding the original script and its creator, please refer to the following link: https://en.wikipedia.org/wiki/User:Chlod/Scripts/WordCount |