MediaWiki:Gadget-extUserInfoTabs.js
注意: 保存した後、ブラウザのキャッシュをクリアする必要があります。Mozilla / Firefox / Safari: [Shift] を押しながら [再読み込み] をクリック、または [Shift]-[Ctrl]-[R] (Macでは [Cmd]-[Shift]-[R]); IE: [Ctrl] を押しながら [更新] をクリック、または [Ctrl]-[F5]; Konqueror: [再読み込み] をクリック、または [F5]; Opera: 「ツール」→「設定」からキャッシュをクリア。
////////////////////
// Name: Gadget-extUserInfoTabs.js
// Description: add Cotributions, Block log and Logs tabs in User pages
// Author: IWAI, Masaharu - [[ja:User:Iwai.masaharu]]
// License: modified BSD License style
// version 0.8
// Changelog:
// 2008-08-01:
// first release
//
if (mw.config.get('wgAction') == 'view' && ($.inArray(mw.config.get('wgNamespaceNumber'), [2 , 3]) !== -1))
$(function edittop_hook(){
var contributionsTitles = {
en: 'Contributions',
ja: '投稿記録'
};
var blocklogTitles = {
en: 'Block log',
ja: '投稿ブロック記録'
};
var logsTitles = {
en: 'Logs',
ja: 'ログ'
};
var username = mw.config.get('wgTitle').replace(/\/.*/,"");
// Contributions
mw.util.addPortletLink('p-cactions', '/wiki/%E7%89%B9%E5%88%A5:%E6%8A%95%E7%A8%BF%E8%A8%98%E9%8C%B2/' + encodeURIComponent(username), contributionsTitles[mw.config.get('wgUserLanguage')], 'ca-contributions');
// Block log
mw.util.addPortletLink('p-cactions', '/w/index.php?title=%E7%89%B9%E5%88%A5:Log&type=block&page=%E5%88%A9%E7%94%A8%E8%80%85:' + encodeURIComponent(username), blocklogTitles[mw.config.get('wgUserLanguage')], 'ca-blocklog');
// Logs
mw.util.addPortletLink('p-cactions', '/w/index.php?title=%E7%89%B9%E5%88%A5:Log&user=' + encodeURIComponent(username), logsTitles[mw.config.get('wgUserLanguage')], 'ca-logs');
});
//
// Copyright 2008 IWAI, Masaharu. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in
// the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY IWAI, Masaharu ``AS IS'' AND ANY EXPRESS
// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL IWAI, Masaharu OR CONTRIBUTORS
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
// OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.