mediawiki.inspect: Remove redundant code for old Opera
authorTimo Tijhof <krinklemail@gmail.com>
Tue, 21 Aug 2018 20:45:59 +0000 (21:45 +0100)
committerKrinkle <krinklemail@gmail.com>
Tue, 21 Aug 2018 20:49:20 +0000 (20:49 +0000)
Opera < 12 is no longer supported in Grade A, which means this
condition can't be reached, unless the variable exists by accident
in a supported browser where we don't want it to (e.g. due to
a gadget, or legacy element-by-id globals)

Change-Id: I2d840ff23397e78a11a6495b90247d3baf124ee5

resources/src/mediawiki.inspect.js

index cec537f..6c4b80d 100644 (file)
         */
        inspect.dumpTable = function ( data ) {
                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.
                } catch ( e ) {}
                try {
                        console.log( JSON.stringify( data, null, 2 ) );
-                       return;
                } catch ( e ) {}
-               mw.log( data );
        };
 
        /**