dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Remove unneeded "eslint-disable no-restricted-properties" from several files"
[lhc/web/wiklou.git]
/
resources
/
src
/
mediawiki.inspect.js
diff --git
a/resources/src/mediawiki.inspect.js
b/resources/src/mediawiki.inspect.js
index
f4545de
..
72a27fa
100644
(file)
--- a/
resources/src/mediawiki.inspect.js
+++ b/
resources/src/mediawiki.inspect.js
@@
-7,7
+7,7
@@
/* eslint-disable no-console */
/* eslint-disable no-console */
-( function (
mw, $
) {
+( function () {
// mw.inspect is a singleton class with static methods
// that itself can also be invoked as a function (mediawiki.base/mw#inspect).
// mw.inspect is a singleton class with static methods
// that itself can also be invoked as a function (mediawiki.base/mw#inspect).
@@
-40,9
+40,13
@@
var i,
units = [ '', ' KiB', ' MiB', ' GiB', ' TiB', ' PiB' ];
var i,
units = [ '', ' KiB', ' MiB', ' GiB', ' TiB', ' PiB' ];
- if ( !$.isNumeric( bytes ) || bytes === 0 ) { return bytes; }
+ if ( !$.isNumeric( bytes ) || bytes === 0 ) {
+ return bytes;
+ }
- for ( i = 0; bytes >= 1024; bytes /= 1024 ) { i++; }
+ for ( i = 0; bytes >= 1024; bytes /= 1024 ) {
+ i++;
+ }
// Maintain one decimal for kB and above, but don't
// add ".0" for bytes.
return bytes.toFixed( i > 0 ? 1 : 0 ) + units[ i ];
// Maintain one decimal for kB and above, but don't
// add ".0" for bytes.
return bytes.toFixed( i > 0 ? 1 : 0 ) + units[ i ];
@@
-153,6
+157,7
@@
style.textContent = css;
document.body.appendChild( style );
style.textContent = css;
document.body.appendChild( style );
+ // eslint-disable-next-line jquery/no-each-util
$.each( style.sheet.cssRules, function ( index, rule ) {
selectors.total++;
// document.querySelector() on prefixed pseudo-elements can throw exceptions
$.each( style.sheet.cssRules, function ( index, rule ) {
selectors.total++;
// document.querySelector() on prefixed pseudo-elements can throw exceptions
@@
-385,4
+390,4
@@
mw.log( 'mw.inspect: reports are not available in debug mode.' );
}
mw.log( 'mw.inspect: reports are not available in debug mode.' );
}
-}(
mediaWiki, jQuery
) );
+}() );