90
edits
m (Testing old button) |
No edit summary |
||
(6 intermediate revisions by 2 users 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 229: | Line 241: | ||
//Author: Princess Platinum | //Author: Princess Platinum | ||
$(function() { | //$(function() { | ||
// $('#collapse-global').html('<a class="mediawiki-button" onclick="for (var i=0; i<50; i++) { "mw-collapsible mw-collapsed sortable wikitable"([i]); }">Expand/Collapse All</a>'); | |||
}); | //}); | ||
//$(function() { | |||
// var $collapseglobal = $('#collapse-global'); | |||
// if ( $collapseglobal.length > 0 ) { | |||
// $collapseglobal.html(''); | |||
// $('<a class="mediawiki-button">Expand/Collapse All</a>').on('click', function() { | |||
// $('a.collapsible-text').trigger('click.collapsible'); | |||
// }).appendTo($collapseglobal); | |||
// } | |||
//}); | |||
Line 237: | Line 260: | ||
/* End of mw.loader.using callback */ | /* End of mw.loader.using callback */ | ||
} ); | } ); | ||
$.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 */ |