From 881cdf4aea8c9843063915f0e962509e1e0f9a56 Mon Sep 17 00:00:00 2001 From: Krinkle Date: Fri, 24 Dec 2010 01:06:29 +0000 Subject: [PATCH] correcting comments in mw.util --- resources/mediawiki.util/mediawiki.util.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/resources/mediawiki.util/mediawiki.util.js b/resources/mediawiki.util/mediawiki.util.js index 51adb0f305..d214dba087 100644 --- a/resources/mediawiki.util/mediawiki.util.js +++ b/resources/mediawiki.util/mediawiki.util.js @@ -121,7 +121,7 @@ * Append a new style block to the head * * @param text String CSS to be appended - * @return the CSS stylesheet + * @return CSSStyleSheet object */ 'addCSS' : function( text ) { var s = document.createElement( 'style' ); @@ -139,8 +139,8 @@ /** * Hide/show the table of contents element * - * @param text String CSS to be appended - * @return the CSS stylesheet + * @param $toggleLink jQuery object of the toggle link + * @return String boolean visibility of the toc (true means it's visible) */ 'toggleToc' : function( $toggleLink ) { var $tocList = $( '#toc ul:first' ), @@ -152,6 +152,7 @@ expires: 30, path: '/' } ); + return true; } else { $tocList.slideUp( 'fast' ); $toggleLink.text( mw.msg( 'showtoc' ) ); @@ -159,6 +160,7 @@ expires: 30, path: '/' } ); + return false; } }, -- 2.20.1