From: Timo Tijhof Date: Tue, 10 Jul 2018 00:25:20 +0000 (-0700) Subject: mediawiki.inspect: Add headings to console and use console.group() X-Git-Tag: 1.34.0-rc.0~4831^2 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=25d81fc705895961ecdff2a3f6a8b40a3ce7e803;p=lhc%2Fweb%2Fwiklou.git 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 --- 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' ); + } } ); };