MediaWiki:Gadget-Prosesize.js: Difference between revisions

Content deleted Content added
fix loading of css
tweak to round size
Line 3:
function sizeFormatter( size ) {
if ( size > 10240 ) {
return ( Math.round( size / 1024 ).toFixed( 0 ) + ' kB' );
} else {
return ( size + ' B' );
Line 103:
var header = $( '<span>' )
.prop( 'id', 'document-size-header' )
.html( 'Document statistics: <small><i>(See <a href="//en.wikipedia.org/wiki/Wikipedia:Prosesize">here</a> for details.)</i></small>' );
var output = $( '<ul>' )
.prop( 'id', 'document-size-stats' );
Line 148:
!mw.config.get( 'wgCanonicalSpecialPageName' )
) {
mw.loader.load( '/w/index.php?title=User:Galobtter/scripts/prosesize.css&action=raw&ctype=text/css', 'text/css' );
$.when( $.ready, mw.loader.using( [ 'mediawiki.api', 'mediawiki.util', 'mediawiki.notify' ] ) ).then( function () {
/**