90
edits
No edit summary |
No edit summary |
||
(2 intermediate revisions 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: | ||
// } | // } | ||
//}); | //}); | ||
Line 261: | Line 262: | ||
mw.loader. | $.when( | ||
mw.loader.getScript( 'https://sarkarverse.org/index.php?title=MediaWiki:MP3Player.js&action=raw&ctype=text/javascript' ) | |||
) | |||
.then( | |||
function () { | |||
$( ".sarkarverse-mp3-player" ).each(function() { | |||
new GreenAudioPlayer( this ); | |||
}); | |||
}, | |||
function ( e ) { | |||
mw.log.error( e.message ); // => "Failed to load script" | |||
} | |||
); | |||
/* DO NOT ADD CODE BELOW THIS LINE */ | /* DO NOT ADD CODE BELOW THIS LINE */ |