NewPP parser report

From MediaWiki.org
(Redirected from PP Report)
Jump to: navigation, search

NewPP is an abbreviation for "New PreProcessor". One is most likely to find it at the bottom of the HTML source of wiki pages generated by Tim Starling's 2008 parser rewrite (introduced in MediaWiki 1.12), referring to the preprocessor report that contains statistics on what resources were used to render the page.

The following snippet (to be stored in custom user JavaScript) will make the NewPP parser report appear on every content page at the bottom:

$('#mw-content-text').contents().filter(function() {
  return this.nodeType == 8 && /Saved|NewPP/.test(this.data);
}).replaceWith(function() { 
  return $('<pre>', { dir: 'ltr' } ).text(this.data); 
});

See also[edit]