MediaWiki:Common.js: Difference between revisions

MediaWiki interface page
No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 3: Line 3:


script.onload = function () {
script.onload = function () {
GreenAudioPlayer.init({
var ul = document.querySelector('#polaroid-gallery ul');
selector: '.audio-wrapper',
stopOthersOnPlay: true
});
GreenAudioPlayer.init({
selector: '.audio-wrapper-2',
stopOthersOnPlay: true
});
};
 
$(function () {
var ul = document.querySelector('#polaroid-gallery ul');
for (var i = ul.children.length; i >= 0; i--) {
for (var i = ul.children.length; i >= 0; i--) {
     ul.appendChild(ul.children[Math.random() * i | 0]);
     ul.appendChild(ul.children[Math.random() * i | 0]);
}
};
}());

Revision as of 11:41, 25 March 2022

/* Any JavaScript here will be loaded for all users on every page load. */


script.onload = function () {
var ul = document.querySelector('#polaroid-gallery ul');
for (var i = ul.children.length; i >= 0; i--) {
    ul.appendChild(ul.children[Math.random() * i | 0]);
};