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
resourceloader: Reduce width of module hash from 7 chars to 5
[lhc/web/wiklou.git]
/
resources
/
src
/
startup
/
mediawiki.js
diff --git
a/resources/src/startup/mediawiki.js
b/resources/src/startup/mediawiki.js
index
a4ee488
..
bbe503d
100644
(file)
--- a/
resources/src/startup/mediawiki.js
+++ b/
resources/src/startup/mediawiki.js
@@
-37,8
+37,8
@@
hash ^= str.charCodeAt( i );
}
hash ^= str.charCodeAt( i );
}
- hash = ( hash >>> 0 ).toString( 36 );
- while ( hash.length <
7
) {
+ hash = ( hash >>> 0 ).toString( 36 )
.slice( 0, 5 )
;
+ while ( hash.length <
5
) {
hash = '0' + hash;
}
/* eslint-enable no-bitwise */
hash = '0' + hash;
}
/* eslint-enable no-bitwise */
@@
-1606,9
+1606,9
@@
// In addition to currReqBase, doRequest() will also add 'modules' and 'version'.
// > '&modules='.length === 9
// In addition to currReqBase, doRequest() will also add 'modules' and 'version'.
// > '&modules='.length === 9
- // > '&version=12345
67'.length === 16
- // > 9 + 1
6 = 25
- currReqBaseLength = makeQueryString( currReqBase ).length + 2
5
;
+ // > '&version=12345
'.length === 14
+ // > 9 + 1
4 = 23
+ currReqBaseLength = makeQueryString( currReqBase ).length + 2
3
;
// We may need to split up the request to honor the query string length limit,
// so build it piece by piece.
// We may need to split up the request to honor the query string length limit,
// so build it piece by piece.