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
Use ES5 String.prototype.trim() instead of jQuery.trim()
[lhc/web/wiklou.git]
/
resources
/
src
/
mediawiki
/
mediawiki.Title.js
diff --git
a/resources/src/mediawiki/mediawiki.Title.js
b/resources/src/mediawiki/mediawiki.Title.js
index
53cbd60
..
9db2771
100644
(file)
--- a/
resources/src/mediawiki/mediawiki.Title.js
+++ b/
resources/src/mediawiki/mediawiki.Title.js
@@
-537,7
+537,7
@@
namespace = defaultNamespace === undefined ? NS_MAIN : defaultNamespace;
// Normalise additional whitespace
namespace = defaultNamespace === undefined ? NS_MAIN : defaultNamespace;
// Normalise additional whitespace
- title =
$.trim( title.replace( /\s/g, ' ' )
);
+ title =
title.replace( /\s/g, ' ' ).trim(
);
// Process initial colon
if ( title !== '' && title[ 0 ] === ':' ) {
// Process initial colon
if ( title !== '' && title[ 0 ] === ':' ) {
@@
-579,7
+579,7
@@
ext = parts.pop();
// Remove whitespace of the name part (that W/O extension)
ext = parts.pop();
// Remove whitespace of the name part (that W/O extension)
- title =
$.trim( parts.join( '.' )
);
+ title =
parts.join( '.' ).trim(
);
// Cut, if too long and append file extension
title = trimFileNameToByteLength( title, ext );
// Cut, if too long and append file extension
title = trimFileNameToByteLength( title, ext );
@@
-587,7
+587,7
@@
} else {
// Missing file extension
} else {
// Missing file extension
- title =
$.trim( parts.join( '.' )
);
+ title =
parts.join( '.' ).trim(
);
// Name has no file extension and a fallback wasn't provided either
return null;
// Name has no file extension and a fallback wasn't provided either
return null;