MediaWiki:Common.js: Difference between revisions

MediaWiki interface page
No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 6: Line 6:
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:42, 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]);
}};