MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 11: Line 11:
  * dependency hasn't arrived yet it'll make sure those are loaded before this.
  * dependency hasn't arrived yet it'll make sure those are loaded before this.
  */
  */
$( document ).ready( function() {
        var $collapseglobal = $('#collapse-global');
        if ( $collapseglobal.length > 0 ) {
                $collapseglobal.html('');
                $('<a class="mediawiki-button">Expand/Collapse All</a>').on('click', function() {
                        $('.mw-collapsible-toggle a').trigger('click.mw-collapsible');
                }).appendTo($collapseglobal);
        }
});


/* global mw, $, importStylesheet, importScript */
/* global mw, $, importStylesheet, importScript */
Line 243: Line 255:
//        }
//        }
//});
//});
$(function() {
        var $collapseglobal = $('#collapse-global');
        if ( $collapseglobal.length > 0 ) {
                $collapseglobal.html('');
                $('<a class="mediawiki-button">Expand/Collapse All</a>').on('click', function() {
                        $('.mw-collapsible-toggle a').trigger('click.mw-collapsible');
                }).appendTo($collapseglobal);
        }
});




Line 266: Line 267:
.then(
.then(
     function () {
     function () {
     new GreenAudioPlayer('.sarkarverse-mp3-player');
     $( ".sarkarverse-mp3-player" ).each(function() {
  new GreenAudioPlayer( this );
});
     },
     },
     function ( e ) {
     function ( e ) {