MediaWiki:Gadget-Prosesize.js: Difference between revisions
Content deleted Content added
Update to get data from prosesize toolforge tool - is more accurate |
Fix for old revisions/edit pages - tool won't work on those pages, so keep using our word counter |
||
Line 157:
// Add the relevant outputs once we have fetched the prose size.
prosePromise.then( function( data ) {
if ( mw.config.get( 'wgIsArticle' ) && mw.config.get( 'wgCurRevisionId' ) === mw.config.get( 'wgRevisionId' ) ) {
proseSize = data.prose_size;▼
// Tool only works for when viewing current version of page, not on old revisions or on edit page
wordCount = data.word_count;▼
▲ proseSize = data.prose_size;
▲ wordCount = data.word_count;
}
proseValue = sizeElement( 'prose-size', 'Prose size (text only):', proseSize - refmarksize, ' (' + wordCount + ' words) "readable prose size"' );
refValue = sizeElement( 'ref-size', 'References (text only):', refSize + refmarksize );
|