View source for MediaWiki:Common.js
From PigBoats.COM
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. */
document.addEventListener("DOMContentLoaded", function () {
console.log('Common.js is loading and running...');
var userGroups = mw.config.get('wgUserGroups');
console.log('User groups detected:', userGroups);
// Hide only for anonymous users
if (userGroups && userGroups.includes('*')) {
console.log('Anonymous user detected, hiding side panels');
var pageTools = document.getElementById('page-tools');
if (pageTools) {
pageTools.style.display = 'none';
}
var wikiTools = document.getElementById('p-tb');
if (wikiTools) {
wikiTools.style.display = 'none';
}
} else {
console.log('Logged in user, no changes applied.');
000
1:0
Return to MediaWiki:Common.js.