Very nice tool for looking at the number or words in an article. In playing with the tool I noticed that it does not pick up editable text with the following characteristics:
<:> indented information is excluded
<*> bulletized information is excluded
<#> numbered information is excluded
For individuals working on large articles these are commonly used techniques for presenting information. Looking at a few articles it seems to reduce actual count by 10-20 percent depending on the structure of the article. Sincerely -- BullockTalk18:38, 24 April 2010 (UTC)[reply]
Thanks for your comments. As explained on the script documentation page, there are a couple of reasons why the script acts in the above way. First, WP:SIZE explicitly excludes lists from "readable prose". Second, the script works by counting text within HTML <p></p> tags; the things you mention above are HTML <dl>, <ul>, and <ol> respectively. One reason why it is non-trivial to include these lists in the prose size calculation is that these tags are also used for the lists of references, citations, and external links, as well as in navboxes, templates, etc, and there is no easy way to exclude those in all articles. I'm very busy at the moment, so I don't have time to try to implement a not-so-easy way. Dr pda (talk) 22:46, 30 June 2010 (UTC)[reply]
I have a problem with using this script with Internet Explorer 6. Whenever I try pressing the "Page size" script, a JavaScript error shows up, and only empty bullet points show up. Is this possible because the XMLHttpRequest object isn't created correctly? I recall that there are two different versions for different Internet Explorer versions. (And just if you are wondering why I'm using Internet Explorer 6: I am using a public library computer, so I have no choice about my browser. I use Firefox at home.) —MC10(T•C•GB•L)00:02, 10 July 2010 (UTC)[reply]
I've been using this script for over a month, but it is no longer working. I tried deleting it and adding again, to no avail. Any suggestions? Thanks. Cindamuse (talk) 10:08, 26 July 2010 (UTC)[reply]
It still works for me. Maybe there's a clash with something else in your settings. Try switching off other settings and then adding them in again until you find the one that may be doing that.- Wolfkeeper21:24, 26 July 2010 (UTC)[reply]
Just a small suggestion: perhaps you could change references to "b [bytes]" to "b (characters)" (and "Kb" to, I don't know, "Kb (1,024 characters)"?), or something along those lines? I was trying to use the tool to figure out if articles achieve the 1,500-character minimum required for DYK, and had to ask someone before discovering that one byte equals one character. — Cheers, JackLee–talk–12:13, 13 August 2010 (UTC)[reply]
Actually, a character can be more than one byte, for example the mdash — (U+2014) is three bytes when stored in UTF-8 (e2 80 94). However, this is turn of the ASCII characters since UTF-8 was specifically designed to be a superset of it. — Dispenser14:11, 30 August 2010 (UTC)[reply]
Wikipedia:Article size#Occasional exceptions refers to the fact that articles which are lists need not be broken up if they exceed 30–50 kB. It doesn't refer to calculation of readable prose, and as such should probably be moved to before the preceding section to avoid confusion. I agree that embedded lists are sometimes appropriate as described in Wikipedia:Manual of Style (embedded lists)#Appropriate use, however see the first section on this talk page for why it is non-trivial to include such lists in the prose size calculation. Unfortunately I am still busy. Dr pda (talk) 22:37, 23 August 2010 (UTC)[reply]
File:Kingdom Hearts new.JPGToday's featured article, with the page size and other scripts visible in the sidebar, using Firefox 3.6.13 for Windows.File:Kingdom Hearts old.JPGAn older revision of the same article, with page size and other scripts missing from the sidebar.
Hi Dr pda, I noticed something odd recently with your script. In an effort to reduce article size, I moved some blockquotes out of the text, and placed them instead in footnotes. The result was that the readable prose size increased, though I thought words in footnotes were not counted. (I realize that words in blockquotes aren't counted.) Can you advise? SlimVirgintalk|contribs23:10, 6 January 2011 (UTC)[reply]
Another query: I noticed that something changed recently. It used to be the case that we could go back into old revisions and see your prosesize button in the toolbox, which meant we could compare versions in terms of word count. Now, for me at least, your tool is only visible in the latest revision. Is that something you can fix? SlimVirginTALK|CONTRIBS18:07, 28 January 2011 (UTC)[reply]
Looking at that old revision with Firefox, in the toolbox I see only What links here, Related changes, Upload files, Special pages, permanent link, and Cite this page. On new revisions I have two further links in the toolbox -- WP:RFPP (a protection tool), and Page size. I just tried it with Google chrome, and I can see the page size tool in old revisions there too, so I wonder if I need to update Firefox or something. Will do that and report back. SlimVirginTALK|CONTRIBS20:10, 28 January 2011 (UTC)[reply]
Any idea what might have changed my end? It was visible in old revisions in Firefox until around four weeks ago, and is still visible to me with browsers other than Firefox. I'd like to try to fix it, because I do a lot of copy-editing to tighten texts, so I'm often comparing word counts between revisions, which now I can't do. The RfPP script that I have in my toolbox has also disappeared in old revisions. SlimVirginTALK|CONTRIBS15:07, 7 February 2011 (UTC)[reply]
I assume that some script in your monobook causes an error, which in turn prevents all subsequent scripts from loading. You can have a look into your javascript error console to find out if there are any errors logged (Ctrl+Shift+J in Firefox). Amalthea2 (talk) 15:16, 7 February 2011 (UTC)[reply]
The problem is not with any of your scripts in User:SlimVirgin/monobook.js, since I just imported it to test, and received no JS errors. Your scripts also appeared for me in Firefox when viewing an old revision. The problem could either be with one of the gadgets you're using, although that's a bit unlikely, too, since those are usually held to a higher standard than most scripts, meaning they're less likely to throw errors—or maybe it's a Firefox extension you recently installed. You could try creating a new profile in Firefox, to see if the problem still exists there. Gary King(talk · scripts)18:25, 7 February 2011 (UTC)[reply]
Thanks, Gary. I started trying to do that, but then got worried about losing my bookmarks, and never finding my way back, so I didn't complete it. :) I haven't changed anything recently in Firefox—haven't installed or uninstalled anything—so I can't think what might have caused it. I may just have to live with it. SlimVirginTALK|CONTRIBS19:09, 7 February 2011 (UTC)[reply]
Hi, as you can see from here I've just fixed a couple of issues with the script, addressing the cases you mentioned (and have now made it count blockquotes). One other thing I discovered is that diffs now have action=historysubmit in the URL, and not action=submit. This must be a recent change. Since I explicitly checked for the type of action being done on the page before adding the "Page Size" link to the toolbox, this may explain why it wasn't showing up for you in some cases. If you bypass your cache this might allow you to see the page size link on old revisions. However, rereading what has been written above, it seems like you also experience this problem also on old revisions, rather than diffs between old revisions, and it is browser-specific, so maybe it's something different. Dr pda (talk) 08:44, 9 February 2011 (UTC)[reply]
Is there an easy option to show raw numeric counts, rather than (or in addition to) "11 kB"?
Values <10000 show four digits of precision, while values >10000 show two.
Readable prose size precision does matter somewhat when calculating 5x article size changes for WP:Did you know. Example: Steven Matheson (revision 413440046), actual size 11497 (by my count). --Lexein (talk) 00:15, 14 February 2011 (UTC)[reply]
Hi Dr pda, Your tool is wonderful. I like it. I am preparing a series of studies about Wikipedia. I would like to know whether or not your tool can count the number of sentences only in PROSE section on a Wikipedia article as your word count function works. cooldenny (talk) 18:25, 30 April 2011 (UTC)[reply]
I have noticed since yesterday that when I want the page size to be shown, all that pops up are four bullet points with emptiness to their right while the respective statistics are supposed to be there instead. I don't know what the problem is there; I signed up for the copyediting drive, and I question how much I am capable of doing without that tool. What should happen for the tool to work again? Backtable Speak to meconcerning my deeds.03:55, 17 May 2011 (UTC)[reply]
Not sure why measuring prose size is required for copy-editing, but: Still works for me when I tried it on Jimmy Thorpe. Which page doesn't work for you? If all: what browser are you using (exact version please), and are you getting any messages in your javascript console? Amalthea07:51, 17 May 2011 (UTC)[reply]
Script works fine for me. It hasn't been modified in a while and you haven't edited any .js pages in a while, either. Perhaps it's a gadget you recently enabled? Try using a different browser to see if it works there, then we can eliminate one variable. Gary King(talk · scripts)12:08, 17 May 2011 (UTC)[reply]
The browser that I am using is Internet Explorer 9, and all pages I've tried the page size gadget on have yielded no success. I tried using page size on another computer, this time with Internet Explorer 8, and I found the yellow higlights and the statistics that I was looking for. Also, I'm not sure or confident that I have another internet browser on my computer, which, for this situation at least, is somewhat undesirable. Also, when Amalthea states "Not sure why measuring prose size is required for copy-editing", that page size tool is used in the Guild of Copy Editors' Backlog elemination drives to determine the amount of words a page has; the words are important in those contests. Backtable Speak to meconcerning my deeds.22:31, 17 May 2011 (UTC)[reply]
On second thought, when I said that I wasn't confident that I had another browser on my computer, that was before I remembered that I also have Google Chrome. I tested the tool on that browser, and it worked there. Thanks for the tip about alternate browsers. Backtable Speak to meconcerning my deeds.01:55, 19 May 2011 (UTC)[reply]
Scripts typically work fine in most browsers but Internet Explorer, so when using scripts in IE, do so at your own risk. The one major difference is in how IE counts empty nodes compared to the other browsers, but there are also other differences as well. Gary King(talk · scripts)02:15, 19 May 2011 (UTC)[reply]
Ever sice the "Technical maintenance will be performed soon. Temporary issues may arise but will be resolved shortly." notice has been displayed at the top of the page, the page size tool has not been working. plumaØ01:45, 5 October 2011 (UTC)[reply]
In the Guild of Copy Editors backlog-reduction drives, sometimes only a section of a very long article needs copyediting and this script worked well in edit-preview mode until recently (I can still get page sizes for whole articles, but not for sections). I recently added a duplicate-links highlighting tool, but am now unable to delete the duplicate-links script from my .js page to see if that's the problem (which exists in both Firefox and Chrome, so I don't think it's a browser issue). Any help much appreciated!--Miniapolis (talk) 02:25, 13 November 2011 (UTC)[reply]
and bypassed the cache and it still doesn't work. My JS error console has many entries for this script; is it possible my version got corrupted somehow?--Miniapolis (talk) 14:36, 13 November 2011 (UTC)[reply]
Thanks again; two other folks have reported the same problem, and one has suggested it may be related to the recent mediawiki software upgrade. We'll see. All the best,--Miniapolis (talk) 21:46, 13 November 2011 (UTC)[reply]
I've been trying to use the page size script to compare past and current revisions of a page, but the "file size" statistic isn't working. Any past revision of any page invariably displays a file size of 58kB. Everything else (prose size, image size, etc) works normally. I'm using IE, but the problem's the same on Firefox. Any ideas? DoctorKubla (talk) 17:02, 5 July 2012 (UTC)[reply]
Hi, could this not be one of those bot type meta tools instead of a somewhat daunting DIY million bytes of code, and don't forget to bypass your systems..? I know, the code is probably excellent, but I'm not quite sure that I am, and then, I thought I managed to measure prose before without having to set up scripts and fiddle with my browser settings. If you start playing with words like "bypass" in machine code and you don't know what you are doing, you are asking for trouble no? ~ R.T.G01:58, 15 July 2013 (UTC)[reply]
As a listed DYK participant, you are invited to contribute to a formal Request for Comment on the question of whether Good Articles should appear in the Did You Know? slot in future. Please see the proposal on its subpage here, or on the main DYK talk page. To add the discussion to your watchlist, click this link. Thank you in advance. GilderienChat|Contributions00:21, 1 August 2013 (UTC)[reply]
I had been using this for a long time. Suddenly it seems to be breaking my use of Wikipedia:HotCat. When I have nothing other than
importScript('User:Dr pda/prosesize.js');
in my common.js I get the prosesize tool working but my HotCat breaks. When I remove it HotCat works again. I thought I would share. Blue Rasberry (talk)16:50, 17 February 2014 (UTC)[reply]
I am new to this whole area, so maybe I am doing something wrong... Trying to follow the instructions, I clicked on the link to "your skin script file" which says there is no such user page "Gronk Oz/vector.js" - I accepted the option to create it.
However, when I pasted the line of code {{subst:js|User:Dr_pda/prosesize.js}} into the top of this new page, it would not allow me to save the changes. The top line (where I pasted the code) had a red cross to the left, and when I hovered the cursor over it, it displays the following error messages:
Prosesize returned the following for 2014 Ferguson unrest. The article has a mix of list-defined references and in-body references. The references numbers seemed too small to include the LDRs, so I copied-and-pasted the LDRs into a .txt file and saved it on my computer. The resulting file was 81 kB in size. I conclude that Prosesize does not include LDRs. It would be great if it could be modified to do so; if that is not feasible, the documentation should be updated to clarify this.
FYI, I have created a shortcut WP:RPS to the guideline about readable prose size. It may be useful to point there from the script's page size stats. I suggest those changes to lines 221–226 of the source. — JFGtalk02:17, 29 November 2016 (UTC)[reply]
I am trying install this tool on my common.js page, but it does not seem to be working. I have tried following the precise steps as laid out on the help page, but I must be doing something wrong. Could someone help? Sorry for the trouble! Ruby2010 (talk) 21:54, 30 December 2019 (UTC)[reply]
Ruby2010 You have it commented out. Try putting this: // User:Dr pda/prosesize after the loader line, (or just delete it.) It should look something like this:
Thanks for looking, MrX. I added the suggested code but it still does not seem to be working (both with the prosesize part and without). I'm very sure this is just user error on my part, but I am not sure how to resolve. Sorry for the silly questions. Its code looks so different from the other tools – is that right? Ruby2010 (talk) 02:10, 31 December 2019 (UTC)[reply]
Ruby2010, you have it correct now. It's identical to the same line in my common.js Can you go to an article and see if it shows up at the very bottom of the Tools menu on the left of the page? You can also try clearing your browser cache and reloading the page. - MrX 🖋 02:43, 31 December 2019 (UTC)[reply]
MrX, hmmmm... you're right, the code looks like yours. I've just cleared my browser's cache and cookies, and then restarted it. The tool is still not appearing. I did all this in Firefox, but I went over to Chrome and followed the same steps – no good, unfortunately. I'll try changing skins and see if that helps. Ruby2010 (talk) 04:17, 31 December 2019 (UTC)[reply]
MrX, I got it! It apparently doesn't work with the Modern skin, but it does work with the (ugly) Vector skin. I'll switch to that when I need to use it. Thanks for your help. Ruby2010 (talk) 04:19, 31 December 2019 (UTC)[reply]