Sb forum speech.png DiscordLink.png FacebookLink.png RedditLink.png SteamLink.png TwitterLink.png YoutubeLink.png

Difference between revisions of "MediaWiki:Mpfunctions.js"

From Starbase wiki
Jump to navigation Jump to search
m
m
Line 1: Line 1:
/* Why do we have to use JQ for this I hate it god MediaWiki you're awful */
function MPSSC() {
$('.MPSSC-list-header').click(function() {
let li = document.QuerySelectorAll('.MPSSC-list-header')
  $(this).toggleClass("active")
for (var i=0;i<li.length;i++) {
})
li[i].addEventListener('click', function(){this.classList.toggle('active')}, false)
console.log(mw.config.get('wgPageName'))
}
}
 
if (mw.config.get('wgPageName')) {
MPSSC();
}

Revision as of 12:32, 14 July 2021

function MPSSC() {
	let li = document.QuerySelectorAll('.MPSSC-list-header')
	for (var i=0;i<li.length;i++) {
		li[i].addEventListener('click', function(){this.classList.toggle('active')}, false)
	}
}

if (mw.config.get('wgPageName')) {
	MPSSC();
}
Cookies help us deliver our services. By using our services, you agree to our use of cookies.