PC Gaming Shelter
An archive dedicated to preserving PC Gaming history and more

MediaWiki:Common.js: Difference between revisions

From PC Gaming Shelter
Created page with "Any JavaScript here will be loaded for all users on every page load.: if (mw.config.get('wgUserName') !== null) { const personal = document.getElementById('p-personal'); document.querySelector('#pane4').appendChild(personal); }"
 
No edit summary
Line 4: Line 4:
const personal = document.getElementById('p-personal');
const personal = document.getElementById('p-personal');
document.querySelector('#pane4').appendChild(personal);
document.querySelector('#pane4').appendChild(personal);
} else {
const personalIcon = document.querySelector('personal-tools-icon');
if (personalIcon) {
personalIcon.remove();
}
}
}

Revision as of 01:18, 17 March 2026

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

if (mw.config.get('wgUserName') !== null) {
	const personal = document.getElementById('p-personal');
	document.querySelector('#pane4').appendChild(personal);
} else {
	const personalIcon = document.querySelector('personal-tools-icon');
	if (personalIcon) {
		personalIcon.remove();
	}
}