View source for MediaWiki:Common.js
From TwogPedia
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
/* Any JavaScript here will be loaded for all users on every page load. */
(function () {
// If Participants team list with a toggle button is added, then make that button clickable
var myElement = document.getElementById('team-toggle');
if ( myElement ) {
myElement.addEventListener('click', function(e){
if ( e.target.innerHTML === 'Show Players' ) e.target.innerHTML = 'Hide Players';
else e.target.innerHTML = 'Show Players';
document.querySelectorAll('.team-list .players').forEach(function(el){
el.classList.toggle('show');
});
});
}
}());
000
1:0
Return to MediaWiki:Common.js.
No categories