Difference between revisions of "MediaWiki:Common.css"

From LinnDocs
Jump to: navigation, search
(Created page with "CSS placed here will be applied to all skins: .tocnumber { display: none; }")
 
m
Line 2: Line 2:
  
 
.tocnumber { display: none; }
 
.tocnumber { display: none; }
 +
 +
$wgHooks['SkinTemplateSetupPageCss'][] = 'wfHideVariousTabsFromAnonymous';
 +
 +
function wfHideVariousTabsFromAnonymous( &$hidetabcss ) {
 +
global $wgUser;
 +
 +
if ( !$wgUser->isLoggedIn() ) {
 +
$hidetabcss .= 'li#ca-history, li#ca-viewsource, li#ca-edit, li#ca-talk, .vectorMenu { display: none; }';
 +
}
 +
 +
return true;
 +
}

Revision as of 14:03, 19 March 2019

/* CSS placed here will be applied to all skins */

.tocnumber { display: none; }

$wgHooks['SkinTemplateSetupPageCss'][] = 'wfHideVariousTabsFromAnonymous';

function wfHideVariousTabsFromAnonymous( &$hidetabcss ) {
	global $wgUser;

	if ( !$wgUser->isLoggedIn() ) {
		$hidetabcss .= 'li#ca-history, li#ca-viewsource, li#ca-edit, li#ca-talk, .vectorMenu { display: none; }';
	}

	return true;
}