X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=resources%2Fsrc%2Fstartup%2Fmediawiki.js;h=97fc02783a7f1dc52397d4dac3cda66d00a18789;hp=bb0408583edba3f9385db3b2af3a33b15c759ee5;hb=fc2a88f66642590dda149590bdb72c5fc9ab5795;hpb=46daa86cb11fe69a8b2fa027cff76033ca5231d5 diff --git a/resources/src/startup/mediawiki.js b/resources/src/startup/mediawiki.js index bb0408583e..97fc02783a 100644 --- a/resources/src/startup/mediawiki.js +++ b/resources/src/startup/mediawiki.js @@ -258,7 +258,6 @@ defineFallbacks(); - /* eslint-disable no-console */ log = ( function () { /** * Write a verbose message to the browser's console in debug mode. @@ -292,7 +291,7 @@ * * @param {...string} msg Messages to output to console */ - log.warn = console && console.warn && Function.prototype.bind ? + log.warn = console && console.warn ? Function.prototype.bind.call( console.warn, console ) : function () {}; @@ -307,7 +306,7 @@ * @since 1.26 * @param {...Mixed} msg Messages to output to console */ - log.error = console && console.error && Function.prototype.bind ? + log.error = console && console.error ? Function.prototype.bind.call( console.error, console ) : function () {}; @@ -322,9 +321,7 @@ * @param {string} [logName=key] Optional custom name for the feature. * This is used instead of `key` in the message and `mw.deprecate` tracking. */ - log.deprecate = !Object.defineProperty ? function ( obj, key, val ) { - obj[ key ] = val; - } : function ( obj, key, val, msg, logName ) { + log.deprecate = function ( obj, key, val, msg, logName ) { var stacks; function maybeLog() { var name, @@ -364,7 +361,6 @@ return log; }() ); - /* eslint-enable no-console */ /** * @class mw