http://www.mediawiki.org/wiki/Special:Code/MediaWiki/96151

Revision: 96151
Author:   krinkle
Date:     2011-09-02 21:19:16 +0000 (Fri, 02 Sep 2011)
Log Message:
-----------
Whitespace indention fix for r96150 (seperate to make review easier)

Modified Paths:
--------------
    trunk/phase3/resources/mediawiki/mediawiki.util.js

Modified: trunk/phase3/resources/mediawiki/mediawiki.util.js
===================================================================
--- trunk/phase3/resources/mediawiki/mediawiki.util.js  2011-09-02 21:17:54 UTC 
(rev 96150)
+++ trunk/phase3/resources/mediawiki/mediawiki.util.js  2011-09-02 21:19:16 UTC 
(rev 96151)
@@ -12,87 +12,87 @@
                 */
                'init' : function() {
 
-                                       /* Set up $.messageBox */
-                                       $.messageBoxNew( {
-                                               'id': 'mw-js-message',
-                                               'parent': '#content'
-                                       } );
+                       /* Set up $.messageBox */
+                       $.messageBoxNew( {
+                               'id': 'mw-js-message',
+                               'parent': '#content'
+                       } );
 
-                                       // Shortcut to client profile return
-                                       var profile = $.client.profile();
+                       // Shortcut to client profile return
+                       var profile = $.client.profile();
 
-                                       /* Set tooltipAccessKeyPrefix */
+                       /* Set tooltipAccessKeyPrefix */
 
-                                       // Opera on any platform
-                                       if ( profile.name == 'opera' ) {
-                                               util.tooltipAccessKeyPrefix = 
'shift-esc-';
+                       // Opera on any platform
+                       if ( profile.name == 'opera' ) {
+                               util.tooltipAccessKeyPrefix = 'shift-esc-';
 
-                                       // Chrome on any platform
-                                       } else if ( profile.name == 'chrome' ) {
-                                               // Chrome on Mac or Chrome on 
other platform ?
-                                               util.tooltipAccessKeyPrefix = ( 
profile.platform == 'mac'
-                                                       ? 'ctrl-option-' : 
'alt-' );
+                       // Chrome on any platform
+                       } else if ( profile.name == 'chrome' ) {
+                               // Chrome on Mac or Chrome on other platform ?
+                               util.tooltipAccessKeyPrefix = ( 
profile.platform == 'mac'
+                                       ? 'ctrl-option-' : 'alt-' );
 
-                                       // Non-Windows Safari with 
webkit_version > 526
-                                       } else if ( profile.platform !== 'win'
-                                               && profile.name == 'safari'
-                                               && profile.layoutVersion > 526 
) {
-                                               util.tooltipAccessKeyPrefix = 
'ctrl-alt-';
+                       // Non-Windows Safari with webkit_version > 526
+                       } else if ( profile.platform !== 'win'
+                               && profile.name == 'safari'
+                               && profile.layoutVersion > 526 ) {
+                               util.tooltipAccessKeyPrefix = 'ctrl-alt-';
 
-                                       // Safari/Konqueror on any platform, or 
any browser on Mac
-                                       // (but not Safari on Windows)
-                                       } else if ( !( profile.platform == 
'win' && profile.name == 'safari' )
-                                                                       && ( 
profile.name == 'safari'
-                                                                       || 
profile.platform == 'mac'
-                                                                       || 
profile.name == 'konqueror' ) ) {
-                                               util.tooltipAccessKeyPrefix = 
'ctrl-';
+                       // Safari/Konqueror on any platform, or any browser on 
Mac
+                       // (but not Safari on Windows)
+                       } else if ( !( profile.platform == 'win' && 
profile.name == 'safari' )
+                                                       && ( profile.name == 
'safari'
+                                                       || profile.platform == 
'mac'
+                                                       || profile.name == 
'konqueror' ) ) {
+                               util.tooltipAccessKeyPrefix = 'ctrl-';
 
-                                       // Firefox 2.x and later
-                                       } else if ( profile.name == 'firefox' 
&& profile.versionBase > '1' ) {
-                                               util.tooltipAccessKeyPrefix = 
'alt-shift-';
-                                       }
+                       // Firefox 2.x and later
+                       } else if ( profile.name == 'firefox' && 
profile.versionBase > '1' ) {
+                               util.tooltipAccessKeyPrefix = 'alt-shift-';
+                       }
 
-                                       /* Fill $content var */
-                                       if ( $( '#bodyContent' ).length ) {
-                                               // Vector, Monobook, Chick etc.
-                                               util.$content = $( 
'#bodyContent' );
+                       /* Fill $content var */
+                       if ( $( '#bodyContent' ).length ) {
+                               // Vector, Monobook, Chick etc.
+                               util.$content = $( '#bodyContent' );
 
-                                       } else if ( $( '#mw_contentholder' 
).length ) {
-                                               // Modern
-                                               util.$content = $( 
'#mw_contentholder' );
+                       } else if ( $( '#mw_contentholder' ).length ) {
+                               // Modern
+                               util.$content = $( '#mw_contentholder' );
 
-                                       } else if ( $( '#article' ).length ) {
-                                               // Standard, CologneBlue
-                                               util.$content = $( '#article' );
+                       } else if ( $( '#article' ).length ) {
+                               // Standard, CologneBlue
+                               util.$content = $( '#article' );
 
-                                       } else {
-                                               // #content is present on 
almost all if not all skins. Most skins (the above cases)
-                                               // have #content too, but as an 
outer wrapper instead of the article text container.
-                                               // The skins that don't have an 
outer wrapper do have #content for everything
-                                               // so it's a good fallback
-                                               util.$content = $( '#content' );
-                                       }
+                       } else {
+                               // #content is present on almost all if not all 
skins. Most skins (the above cases)
+                               // have #content too, but as an outer wrapper 
instead of the article text container.
+                               // The skins that don't have an outer wrapper 
do have #content for everything
+                               // so it's a good fallback
+                               util.$content = $( '#content' );
+                       }
 
-                                       /* Table of Contents toggle */
-                                       var     $tocContainer = $( '#toc' ),
-                                               $tocTitle = $( '#toctitle' ),
-                                               $tocToggleLink = $( 
'#togglelink' );
-                                       // Only add it if there is a TOC and 
there is no toggle added already
-                                       if ( $tocContainer.length && 
$tocTitle.length && !$tocToggleLink.length ) {
-                                               var     hideTocCookie = 
$.cookie( 'mw_hidetoc' );
-                                                       $tocToggleLink = $( '<a 
href="#" class="internal" id="togglelink"></a>' )
-                                                               .text( mw.msg( 
'hidetoc' ) )
-                                                               .click( 
function(e){
-                                                                       
e.preventDefault();
-                                                                       
util.toggleToc( $(this) );
-                                                       } );
-                                               $tocTitle.append( 
$tocToggleLink.wrap( '<span class="toctoggle"></span>' ).parent().prepend( 
'&nbsp;[' ).append( ']&nbsp;' ) );
+                       /* Table of Contents toggle */
+                       var     $tocContainer = $( '#toc' ),
+                               $tocTitle = $( '#toctitle' ),
+                               $tocToggleLink = $( '#togglelink' );
+                       // Only add it if there is a TOC and there is no toggle 
added already
+                       if ( $tocContainer.length && $tocTitle.length && 
!$tocToggleLink.length ) {
+                               var     hideTocCookie = $.cookie( 'mw_hidetoc' 
);
+                                       $tocToggleLink = $( '<a href="#" 
class="internal" id="togglelink"></a>' )
+                                               .text( mw.msg( 'hidetoc' ) )
+                                               .click( function(e){
+                                                       e.preventDefault();
+                                                       util.toggleToc( $(this) 
);
+                                       } );
+                               $tocTitle.append( $tocToggleLink.wrap( '<span 
class="toctoggle"></span>' ).parent().prepend( '&nbsp;[' ).append( ']&nbsp;' ) 
);
 
-                                               if ( hideTocCookie == '1' ) {
-                                                       // Cookie says user 
want toc hidden
-                                                       $tocToggleLink.click();
-                                               }
-                                       }
+                               if ( hideTocCookie == '1' ) {
+                                       // Cookie says user want toc hidden
+                                       $tocToggleLink.click();
+                               }
+                       }
                },
 
                /* Main body */


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to