Jump to content

Manual:タブの除去

From mediawiki.org
This page is a translated version of the page Manual:Removing tabs and the translation is 38% complete.
サイドバーのリンクを除去するにはManual:インターフェイス/サイドバー を参照してください

MediaWiki にあるタブは下のコードを MediaWiki:Common.css に追加することで除去できます。

タブの除去

対応するタブを除去するために下のコードをMediaWiki:Common.cssに追加してください:

コード 説明
#ca-nstab-main { display: none !important; } ページ タブ
#ca-nstab-user { display: none !important; } 利用者ページ タブ (個人の利用者ページのページ タブ)
#ca-talk { display: none !important; } 議論タブ
#ca-view { display: none !important; } 閲覧タブ (用意された外装では、このタブはベクター外装のみで有効です)
#ca-edit { display: none !important; } 編集タブ。ビジュアルエディターがインストールされている場合は「ソースを編集」です
#ca-ve-edit { display: none !important; } ビジュアルエディターがインストールされている時の編集タブ
#ca-formedit { display: none !important; } Edit with Form tab when Page Forms are installed.
#ca-history { display: none !important;} 履歴表示タブ
#ca-watch { display: none !important; } the Watch tab for adding the page to the watchlist
#ca-unwatch { display: none !important; } the Unwatch tab for removing the page from the watchlist
#ca-delete { display: none !important; } Delete tab (in the Vector skins it's displayed with the More drop-down menu)
#ca-move { display: none !important; } Move tab (in the Vector skin it's part of the More drop-down menu)
#ca-protect { display: none !important; } Protect tab (as the previous two, with the Vector skin it's in the More drop-down menu)
#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

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.

Lines between tabs

In the Vector skin, the light blue fading lines between tabs is called the div.vectorTabs span. The light blue fading lines on the sides are left-navigation and right-navigation.

関連項目

Topic on Project:Support desk: