Difference between revisions of "MediaWiki:Common.css"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
/* CSS placed here will be applied to all skins */ | /* CSS placed here will be applied to all skins */ | ||
− | #ca-viewsource | + | $wgHooks['SkinTemplateSetupPageCss'][] = 'wfHideVariousTabsFromAnonymous'; |
− | #ca-talk { display: none | + | |
+ | 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 06:14, 18 April 2021
/* CSS placed here will be applied to all skins */ $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; }