Difference between revisions of "MediaWiki:Common.css"

Line 1: Line 1:
/* CSS placed here will be applied to all skins */
/* CSS placed here will be applied to all skins */
$wgHooks['SkinTemplateSetupPageCss'][] = 'wfHideVariousTabsFromAnonymous';
<!-- No [view source] tab for anonymous users -->
 
<?php global $wgUser; if( $wgUser->isAnon() ) { ?>
function wfHideVariousTabsFromAnonymous( &$hidetabcss ) {
      <style type="text/css">
global $wgUser;
        #ca-viewsource { display: none !important; }
 
      </style>
if ( !$wgUser->isLoggedIn() ) {
    <?php } ?>
$hidetabcss .= 'li#t-whatlinkshere, li#t-recentchangeslinked, li#t-specialpages, li#t-permalink, li#t-info, .bouquetMenu { display: none; }';
}
 
return true;
}

Revision as of 21:29, 18 November 2021

/* CSS placed here will be applied to all skins */
<!-- No [view source] tab for anonymous users -->
<?php global $wgUser; if( $wgUser->isAnon() ) { ?>
      <style type="text/css">
        #ca-viewsource { display: none !important; }
      </style> 
    <?php } ?>