MediaWiki:Common.js: Difference between revisions
From Wiki-DB
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
// Sysop-Navigation nur für Sysops anzeigen | |||
var groups = mw.config.get('wgUserGroups'); | ( function () { | ||
if ( | var groups = mw.config.get( 'wgUserGroups' ) || []; | ||
if ( groups.indexOf( 'sysop' ) === -1 ) { | |||
// Sofort ausblenden ohne auf Hook zu warten | |||
var style = document.createElement( 'style' ); | |||
style.textContent = '#p-administration { display: none !important; }'; | |||
document.head.appendChild( style ); | |||
} | } | ||
}); | }() ); | ||
Latest revision as of 22:52, 13 April 2026
// Sysop-Navigation nur für Sysops anzeigen
( function () {
var groups = mw.config.get( 'wgUserGroups' ) || [];
if ( groups.indexOf( 'sysop' ) === -1 ) {
// Sofort ausblenden ohne auf Hook zu warten
var style = document.createElement( 'style' );
style.textContent = '#p-administration { display: none !important; }';
document.head.appendChild( style );
}
}() );