jquery.makeCollapsible: Remove useless debug logging
authorBartosz Dziewoński <matma.rex@gmail.com>
Wed, 27 Nov 2013 13:30:19 +0000 (14:30 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Wed, 27 Nov 2013 13:30:19 +0000 (14:30 +0100)
Custom togglers are nowhere near exciting enough to log the fact that
we're looking for them.

Added ages ago in r78989 when this script was more hairy.

Change-Id: Ieec216e5f203f4d808194733d96dcb3ebe9aaf9b

resources/jquery/jquery.makeCollapsible.js

index 30be2bd..60c0afc 100644 (file)
@@ -15,8 +15,6 @@
  * @license GPL2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
  */
 ( function ( $, mw ) {
-       var lpx = 'jquery.makeCollapsible> ';
-
        /**
         * Handler for a click on a collapsible toggler.
         *
                        } else {
                                collapsibleId = $collapsible.attr( 'id' ) || '';
                                if ( collapsibleId.indexOf( 'mw-customcollapsible-' ) === 0 ) {
-                                       mw.log( lpx + 'Found custom collapsible: #' + collapsibleId );
                                        $customTogglers = $( '.' + collapsibleId.replace( 'mw-customcollapsible', 'mw-customtoggle' ) );
-
-                                       // Double check that there is actually a customtoggle link
-                                       if ( !$customTogglers.length ) {
-                                               mw.log( lpx + '#' + collapsibleId + ': Missing toggler!' );
-                                       }
                                }
                        }
 
-                       // Bind the togglers
+                       // Add event handlers to custom togglers or create our own ones
                        if ( $customTogglers && $customTogglers.length ) {
                                actionHandler = function ( e, opts ) {
                                        var defaultOpts = {};