From 25d81fc705895961ecdff2a3f6a8b40a3ce7e803 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Mon, 9 Jul 2018 17:25:20 -0700 Subject: [PATCH] mediawiki.inspect: Add headings to console and use console.group() This adds a log message before each dump to indicate which report follows. Most of the table's headings communicated to some extend what the table is about, but the heading should make it easier to use. Also, where available, use console.group(), which makes the tables collapsible for easier navigation. Change-Id: I6855441ce6e3052cdc875e439380820b61d040c1 --- resources/src/mediawiki.inspect.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/resources/src/mediawiki.inspect.js b/resources/src/mediawiki.inspect.js index e2030c9e55..b30a30e20e 100644 --- a/resources/src/mediawiki.inspect.js +++ b/resources/src/mediawiki.inspect.js @@ -214,7 +214,15 @@ Object.keys( inspect.reports ); reports.forEach( function ( name ) { + if ( console.group ) { + console.group( 'mw.inspect ' + name + ' report' ); + } else { + console.log( 'mw.inspect ' + name + ' report' ); + } inspect.dumpTable( inspect.reports[ name ]() ); + if ( console.group ) { + console.groupEnd( 'mw.inspect ' + name + ' report' ); + } } ); }; -- 2.20.1