r78958 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78957‎ | r78958 | r78959 >
Date:13:41, 24 December 2010
Author:krinkle
Status:ok (Comments)
Tags:
Comment:
jslint warnings fixed in mw.util
Modified paths:
  • /trunk/phase3/resources/mediawiki.util/mediawiki.util.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki.util/mediawiki.util.js
@@ -70,12 +70,12 @@
7171 $( '.mw-collapsible' ).makeCollapsible();
7272
7373 /* Table of Contents toggle */
74 - var $tocContainer = $( '#toc' ),
 74+ var $tocContainer = $( '#toc' ),
7575 $tocTitle = $( '#toctitle' ),
7676 $tocToggleLink = $( '#togglelink' );
7777 // Only add it if there is a TOC and there is no toggle added already
7878 if ( $tocContainer.size() && $tocTitle.size() && !$tocToggleLink.size() ) {
79 - var hideTocCookie = $.cookie( 'mw_hidetoc' ),
 79+ var hideTocCookie = $.cookie( 'mw_hidetoc' );
8080 $tocToggleLink = $( '<a href="#" class="internal" id="togglelink">' ).text( mw.msg( 'hidetoc' ) ).click( function(e){
8181 e.preventDefault();
8282 mw.util.toggleToc( $(this) );
@@ -146,7 +146,7 @@
147147 * @return String boolean visibility of the toc (true means it's visible)
148148 */
149149 'toggleToc' : function( $toggleLink ) {
150 - var $tocList = $( '#toc ul:first' ),
 150+ var $tocList = $( '#toc ul:first' );
151151
152152 if ( $tocList.is( ':hidden' ) ) {
153153 $tocList.slideDown( 'fast' );

Comments

#Comment by Krinkle (talk | contribs)   12:54, 7 March 2011

The fix being that there was a bogus comma after the var statement which is now fixed (replaced with a semicolon). and some space-to-tab indention to line everything up.

Status & tagging log