summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
cd6bc61)
* Use $.toJSON rather than JSON.stringify. Make mediawiki.inspect depend on
jquery.json.
* Firefox doesn't define a console.table, but doesn't throw an exception either
if you attempt to invoke it. Use Function.prototype#call to call Firefox's
bluff.
Change-Id: Ib45487d10488f08a98d9635ab9a2a9212e9ef69f
),
'mediawiki.inspect' => array(
'scripts' => 'resources/mediawiki/mediawiki.inspect.js',
),
'mediawiki.inspect' => array(
'scripts' => 'resources/mediawiki/mediawiki.inspect.js',
- 'dependencies' => 'jquery.byteLength',
+ 'dependencies' => array(
+ 'jquery.byteLength',
+ 'jquery.json',
+ ),
'targets' => array( 'desktop', 'mobile' ),
),
'mediawiki.feedback' => array(
'targets' => array( 'desktop', 'mobile' ),
),
'mediawiki.feedback' => array(
try {
// Bartosz made me put this here.
if ( window.opera ) { throw window.opera; }
try {
// Bartosz made me put this here.
if ( window.opera ) { throw window.opera; }
+ // Use Function.prototype#call to force an exception on Firefox,
+ // which doesn't define console#table but doesn't complain if you
+ // try to invoke it.
+ console.table.call( console.table, data );
return;
} catch (e) {}
try {
return;
} catch (e) {}
try {
- console.log( JSON.stringify( data, null, 2 ) );
+ console.log( $.toJSON( data, null, 2 ) );
return;
} catch (e) {}
mw.log( data );
return;
} catch (e) {}
mw.log( data );