From 2d947311a4f509e600e692a786c34fc83d012309 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Tue, 21 Aug 2018 21:45:59 +0100 Subject: [PATCH] mediawiki.inspect: Remove redundant code for old Opera 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 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/resources/src/mediawiki.inspect.js b/resources/src/mediawiki.inspect.js index cec537fa37..6c4b80d2ae 100644 --- a/resources/src/mediawiki.inspect.js +++ b/resources/src/mediawiki.inspect.js @@ -185,8 +185,6 @@ */ 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. @@ -196,9 +194,7 @@ } catch ( e ) {} try { console.log( JSON.stringify( data, null, 2 ) ); - return; } catch ( e ) {} - mw.log( data ); }; /** -- 2.20.1