From f634c159629eae8ea532322698d9ccd5c9a27daf Mon Sep 17 00:00:00 2001 From: Krinkle Date: Fri, 2 Sep 2011 21:19:16 +0000 Subject: [PATCH] Whitespace indention fix for r96150 (seperate to make review easier) --- resources/mediawiki/mediawiki.util.js | 150 +++++++++++++------------- 1 file changed, 75 insertions(+), 75 deletions(-) diff --git a/resources/mediawiki/mediawiki.util.js b/resources/mediawiki/mediawiki.util.js index b8d4e7f21a..e1fed4a097 100644 --- a/resources/mediawiki/mediawiki.util.js +++ b/resources/mediawiki/mediawiki.util.js @@ -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(); - - /* Set tooltipAccessKeyPrefix */ - - // 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-' ); - - // 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-'; - - // Firefox 2.x and later - } else if ( profile.name == 'firefox' && profile.versionBase > '1' ) { - util.tooltipAccessKeyPrefix = 'alt-shift-'; - } + // Shortcut to client profile return + var profile = $.client.profile(); + + /* Set tooltipAccessKeyPrefix */ + + // 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-' ); + + // 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-'; + + // 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 = $( '' ) - .text( mw.msg( 'hidetoc' ) ) - .click( function(e){ - e.preventDefault(); - util.toggleToc( $(this) ); - } ); - $tocTitle.append( $tocToggleLink.wrap( '' ).parent().prepend( ' [' ).append( '] ' ) ); - - if ( hideTocCookie == '1' ) { - // Cookie says user want toc hidden - $tocToggleLink.click(); - } - } + /* 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 = $( '' ) + .text( mw.msg( 'hidetoc' ) ) + .click( function(e){ + e.preventDefault(); + util.toggleToc( $(this) ); + } ); + $tocTitle.append( $tocToggleLink.wrap( '' ).parent().prepend( ' [' ).append( '] ' ) ); + + if ( hideTocCookie == '1' ) { + // Cookie says user want toc hidden + $tocToggleLink.click(); + } + } }, /* Main body */ -- 2.20.1