Also, a minor fix to $.byteLength docs
Change-Id: I0f93edb0cb61a057da5ce0876b74cd17179c6587
'resources/src/mediawiki.rcfilters/mw.rcfilters.UriProcessor.js',
],
'dependencies' => [
'resources/src/mediawiki.rcfilters/mw.rcfilters.UriProcessor.js',
],
'dependencies' => [
'oojs',
'mediawiki.api',
'mediawiki.api.options',
'oojs',
'mediawiki.api',
'mediawiki.api.options',
* @static
* @inheritable
* @param {string} str
* @static
* @inheritable
* @param {string} str
*/
jQuery.byteLength = function ( str ) {
// This basically figures out how many bytes a UTF-16 string (which is what js sees)
*/
jQuery.byteLength = function ( str ) {
// This basically figures out how many bytes a UTF-16 string (which is what js sees)
// Stringify state
stringified = JSON.stringify( state );
// Stringify state
stringified = JSON.stringify( state );
- if ( stringified.length > 65535 ) {
+ if ( $.byteLength( stringified ) > 65535 ) {
// Sanity check, since the preference can only hold that.
return;
}
// Sanity check, since the preference can only hold that.
return;
}