r75642 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75641‎ | r75642 | r75643 >
Date:14:44, 29 October 2010
Author:krinkle
Status:ok
Tags:
Comment:
Follow-up r75577
Modified paths:
  • /trunk/phase3/resources/mediawiki.util/mediawiki.util.js (modified) (history)
  • /trunk/phase3/resources/mediawiki.util/mediawiki.util.test.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki.util/mediawiki.util.test.js
@@ -90,7 +90,7 @@
9191 'function (string)');
9292 mw.test.addTest('mw.util.rawurlencode( \'Test: A&B/Here\' )',
9393 'Test%3A%20A%26B%2FHere (string)');
94 - mw.test.addTest('typeof mw.util.wfGetlink',
 94+ mw.test.addTest('typeof mw.util.wikiGetlink',
9595 'function (string)');
9696 mw.test.addTest('typeof mw.util.getParamValue',
9797 'function (string)');
Index: trunk/phase3/resources/mediawiki.util/mediawiki.util.js
@@ -74,8 +74,8 @@
7575 * Checks if the current browser matches
7676 *
7777 * @example mw.util.isBrowser( 'safari' );
78 - * @param String str name of a browser (case insensitive). Check jquery.client.js for possible values
79 - * @return Boolean true of the browsername matches the clients browser
 78+ * @param String str name of a browser (case insensitive). Check jquery.client.js for possible values
 79+ * @return Boolean true of the browsername matches the clients browser
8080 */
8181 'isBrowser' : function( str ) {
8282 str = (str + '').toLowerCase();
@@ -86,8 +86,8 @@
8787 * Checks if the current layout matches
8888 *
8989 * @example mw.util.isLayout( 'webkit' );
90 - * @param String str name of a layout engine (case insensitive). Check jquery.client.js for possible values
91 - * @return Boolean true of the layout engine matches the clients browser
 90+ * @param String str name of a layout engine (case insensitive). Check jquery.client.js for possible values
 91+ * @return Boolean true of the layout engine matches the clients browser
9292 */
9393 'isLayout' : function( str ) {
9494 str = (str + '').toLowerCase();
@@ -98,8 +98,8 @@
9999 * Checks if the current layout matches
100100 *
101101 * @example mw.util.isPlatform( 'mac' );
102 - * @param String str name of a platform (case insensitive). Check jquery.client.js for possible values
103 - * @return Boolean true of the platform matches the clients platform
 102+ * @param String str name of a platform (case insensitive). Check jquery.client.js for possible values
 103+ * @return Boolean true of the platform matches the clients platform
104104 */
105105 'isPlatform' : function( str ) {
106106 str = (str + '').toLowerCase();
@@ -110,8 +110,8 @@
111111 * Checks if the current browser version matches
112112 *
113113 * @example mw.util.isBrowserVersion( '5' );
114 - * @param String str version number without decimals
115 - * @return Boolean true of the version number matches the clients browser
 114+ * @param String str version number without decimals
 115+ * @return Boolean true of the version number matches the clients browser
116116 */
117117 'isBrowserVersion' : function( str ) {
118118 return this.clientProfile.versionBase === str;
@@ -135,24 +135,24 @@
136136 *
137137 * @param String str string to be encoded
138138 */
139 - 'wfUrlencode' : function( str ) {
 139+ 'wikiUrlencode' : function( str ) {
140140 return this.rawurlencode( str ).replace( /%20/g, '_' ).replace( /%3A/g, ':' ).replace( /%2F/g, '/' );
141141 },
142142
143143 /**
144144 * Get the full url to a pagename
145145 *
146 - * @param String str pagename to link to
 146+ * @param String str pagename to link to
147147 */
148 - 'wfGetlink' : function( str ) {
149 - return wgServer + wgArticlePath.replace( '$1', this.wfUrlencode( str ) );
 148+ 'wikiGetlink' : function( str ) {
 149+ return wgServer + wgArticlePath.replace( '$1', this.wikiUrlencode( str ) );
150150 },
151151
152152 /**
153153 * Check is a variable is empty. Support for strings, booleans, arrays and objects.
154154 * String "0" is considered empty. String containing only whitespace (ie. " ") is considered not empty.
155155 *
156 - * @param Mixed v the variable to check for empty ness
 156+ * @param Mixed v the variable to check for empty ness
157157 */
158158 'isEmpty' : function( v ) {
159159 var key;
@@ -246,7 +246,7 @@
247247 return;
248248 }
249249
250 - $nodes.each(function ( i ) {
 250+ $nodes.each( function ( i ) {
251251 var tip = $(this).attr( 'title' );
252252 if ( !!tip && mw.util.tooltipAccessKeyRegexp.exec( tip ) ) {
253253 tip = tip.replace( mw.util.tooltipAccessKeyRegexp, '[' + mw.util.tooltipAccessKeyPrefix + "$5]" );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75577changing mw.uti functionnames to follow convention + loading $.client as depe...krinkle20:27, 27 October 2010

Status & tagging log