MediaWiki:Gadget-Prosesize.js: Difference between revisions
Content deleted Content added
ce |
use revisionid for prosesize API |
||
Line 137:
// Use prosesize API to get a more accurate prose size account
// The calculations below are left in for the highlighting
prosePromise = $.getJSON( 'https://prosesize.toolforge.org/api/en.wikipedia.org/'
+ mw.config.get( 'wgPageName' ) + '?revision=' + mw.config.get( 'wgRevisionId' ) );
// Calculate prose size and size of reference markers ([1] etc)
Line 157 ⟶ 158:
// Add the relevant outputs once we have fetched the prose size.
prosePromise.then( function( data ) {
if ( mw.config.get( 'wgIsArticle
// Tool doesn't work on previews
proseSize = data.prose_size;
wordCount = data.word_count;
|