User:Subfader/Hide page tabs

This 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 descibes how to hide certain tabs for certain users or page restrictions. Add the following at the end of the skin's header (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 anonymous users.

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

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

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

Note

 * Hiding a tab by CSS doesn't prevent users from accessing the page nontheless. The page can still be accessed by typing the according parameter to the URL or it may simply be linked by another page like special pages.
 * Those tricks do not work if the tab is explicitly forced by an extension or the user's CSS.
 * To hide other tabs you need the list ID. To find it mark the tabs > right-click > view source (or whatever it is called in your browser). E.g. for the discussion link it is id="ca-talk".