User:Subfader/Hide page tabs

This page describes how to hide page tabs.

Generally
The following needs to be added to your MediaWiki:Common.css or your personal user css.

No tab on all pages
This hides the [watch] tab on all pages.
 * 1) ca-watch { display: none !important; }

No tab per page name
This hides the [discussion] tab on Main Page. .page-Main_Page #ca-talk { display: none !important; }

By Conditional clauses
This describes how to hide certain tabs for certain user groups or page restrictions. Add the following at the end of the skin's head (e.g. Monobook.php / above ).

No tabs for certain pages
This hides the [view source] tab on protected pages.

isProtected('edit') ) { ?> #ca-viewsource { display: none !important; } 

No tabs for certain users
This hides the [view source] tab for anonymous users. Makes sense if you disabled editing for those.

isAnon ) { ?> #ca-viewsource { display: none !important; } 

This hides the [view source] tab for users who are not allowed to edit pages.

isAllowed('edit') ) { ?> #ca-viewsource { display: none !important; } 

In combination
This hides the [view source] tab on protected pages to users who are not allowed to delete pages.

isProtected('edit') && !$wgUser->isAllowed('delete') ) { ?> #ca-viewsource { display: none !important; } 