X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=resources%2Fsrc%2Fstartup%2Fmediawiki.js;h=fee69c07bf152cd298b8c985e9a66ffacba0500f;hp=29f74455ba69dc2a8c05194478a684746f46c6a6;hb=2f5d88819799f077f4d3a3288dad104141692f20;hpb=fb11be8c45b69c07f27b99a45d04d852fe2415f3;ds=sidebyside diff --git a/resources/src/startup/mediawiki.js b/resources/src/startup/mediawiki.js index 29f74455ba..fee69c07bf 100644 --- a/resources/src/startup/mediawiki.js +++ b/resources/src/startup/mediawiki.js @@ -255,7 +255,6 @@ defineFallbacks(); - /* eslint-disable no-console */ log = ( function () { /** * Write a verbose message to the browser's console in debug mode. @@ -289,7 +288,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 () {}; @@ -304,7 +303,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 () {}; @@ -319,9 +318,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, @@ -361,7 +358,6 @@ return log; }() ); - /* eslint-enable no-console */ /** * @class mw