Manual:Remove Tabs/zh

From MediaWiki.org
Jump to navigation Jump to search
其他语言: English  • 中文

MediaWiki上的标签可以通过在MediaWiki:Common.css中添加如下代码而去除。

移除标签[edit]

Code Explanation
<nowiki>#</nowiki>ca-nstab-main { display:none!important; } Page tab
<nowiki>#</nowiki>ca-nstab-user { display:none!important; } User page tab (the Page tab on personal user pages)
<nowiki>#</nowiki>ca-talk { display:none!important; } Discussion tab
<nowiki>#</nowiki>ca-view { display:none!important; } Read tab (from the prepackaged skins this tab is available only in the Vector skin)
<nowiki>#</nowiki>ca-edit { display:none!important; } Edit tab
<nowiki>#</nowiki>ca-history { display:none!important; } View history/History tab
<nowiki>#</nowiki>ca-watch { display:none!important; } the Watch tab for adding the page to the watchlist
<nowiki>#</nowiki>ca-unwatch { display:none!important; } the Unwatch tab for removing the page from the watchlist
<nowiki>#</nowiki>ca-delete { display:none!important; } Delete tab (in the Vector skins it's displayed with the More drop-down menu)
<nowiki>#</nowiki>ca-move { display:none!important; } Move tab (in the Vector skin it's part of the More drop-down menu)
<nowiki>#</nowiki>ca-protect { display:none!important; } Protect tab (as the previous two, with the Vector skin it's in the More drop-down menu)
<nowiki>#</nowiki>ca-viewsource { display:none!important; } View source tab; this tab is available for users who belong to user groups that don't have the permission to edit pages. With it the user can view the source text of the page without being able to modify it.

Remove Tabs from Specific Pages[edit]

It is possible to remove a tab only from a particular page(s) of your choice. For example, the following: body.page-Main_Page li#ca-delete { display:none!important; } will hide the Delete tab on the Main Page. You only have to replace the ID of the tab and the name of the page. In the above example the ID of the tab is #ca-delete and the name of the page Main_Page. So, for example, if you want to remove the Discussion tab on a page with the name "Example Page",  use this code: body.page-Example_Page li#ca-talk { display:none!important; } If the name of the page consists of more than one word, put underscores (_) between the words.

参见[edit]

Extensions