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 "docs: Fix typo on Doxygen main page"
[lhc/web/wiklou.git]
/
resources
/
src
/
mediawiki.inspect.js
diff --git
a/resources/src/mediawiki.inspect.js
b/resources/src/mediawiki.inspect.js
index
72a27fa
..
c7b99b2
100644
(file)
--- a/
resources/src/mediawiki.inspect.js
+++ b/
resources/src/mediawiki.inspect.js
@@
-36,12
+36,13
@@
} );
}
} );
}
- function humanSize( bytes ) {
+ function humanSize( bytes
Input
) {
var i,
var i,
+ bytes = +bytesInput,
units = [ '', ' KiB', ' MiB', ' GiB', ' TiB', ' PiB' ];
units = [ '', ' KiB', ' MiB', ' GiB', ' TiB', ' PiB' ];
- if (
!$.isNumeric( bytes ) || bytes === 0
) {
- return bytes;
+ if (
bytes === 0 || isNaN( bytes )
) {
+ return bytes
Input
;
}
for ( i = 0; bytes >= 1024; bytes /= 1024 ) {
}
for ( i = 0; bytes >= 1024; bytes /= 1024 ) {
@@
-157,7
+158,7
@@
style.textContent = css;
document.body.appendChild( style );
style.textContent = css;
document.body.appendChild( style );
- // eslint-disable-next-line jquery/no-each-util
+ // eslint-disable-next-line
no-
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
@@
-241,7
+242,7
@@
*/
inspect.grep = function ( pattern ) {
if ( typeof pattern.test !== 'function' ) {
*/
inspect.grep = function ( pattern ) {
if ( typeof pattern.test !== 'function' ) {
- pattern = new RegExp( mw.
RegExp.escape
( pattern ), 'g' );
+ pattern = new RegExp( mw.
util.escapeRegExp
( pattern ), 'g' );
}
return inspect.getLoadedModules().filter( function ( moduleName ) {
}
return inspect.getLoadedModules().filter( function ( moduleName ) {
@@
-339,7
+340,7
@@
if ( stats.enabled ) {
$.extend( stats, mw.loader.store.stats );
try {
if ( stats.enabled ) {
$.extend( stats, mw.loader.store.stats );
try {
- raw = localStorage.getItem( mw.loader.store.
getStoreKey()
);
+ raw = localStorage.getItem( mw.loader.store.
key
);
stats.totalSizeInBytes = byteLength( raw );
stats.totalSize = humanSize( byteLength( raw ) );
} catch ( e ) {}
stats.totalSizeInBytes = byteLength( raw );
stats.totalSize = humanSize( byteLength( raw ) );
} catch ( e ) {}