user-upload
32,192
回編集
細 (<ref>が正しく挿入できるように修正) |
細編集の要約なし |
||
(3人の利用者による、間の8版が非表示) | |||
1行目: | 1行目: | ||
// <nowiki> | |||
function customizeToolbar() { | function customizeToolbar() { | ||
$('#wpTextbox1').wikiEditor('addToToolbar', { | $('#wpTextbox1').wikiEditor('addToToolbar', { | ||
7行目: | 9行目: | ||
deferLoad: true, | deferLoad: true, | ||
pages: { | pages: { | ||
' | 'headers': { | ||
'layout': 'characters', | 'layout': 'characters', | ||
'label': ' | 'label': 'ヘッダ要素', | ||
'characters': [ | 'characters': [ | ||
{ | { | ||
label: ' | label: '{{グループ情報}}', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: ' | pre: '{{グループ情報\n| グループ名 = \n| 画像 = \n| 関連ページ = \n| 活動期間 = \n| チーム = \n| レーベル = \n| 総合プロデューサー = \n| 公式サイト = \n}}', | ||
ownline: true | |||
} | } | ||
} | } | ||
}, | }, | ||
{ | { | ||
label: '{{ | label: '{{ユニット情報}}', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: '{{ | pre: '{{ユニット情報\n| 名前 = \n| 画像 = \n| 活動期間 = \n| レーベル = \n| 事務所 = \n| 公式サイト = \n| メンバー = \n| 旧メンバー = \n}}', | ||
ownline: true | |||
} | } | ||
} | } | ||
}, | }, | ||
{ | { | ||
label: ' | label: '{{メンバー情報}}', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: ' | pre: '{{メンバー情報\n| グループ = \n| チーム = \n| 名前 = \n| 読み = \n| 画像 = \n| 公式ニックネーム = \n| 所属事務所 = \n| 生年月日 = \n| 出身地 = \n| 血液型 = \n| 身長 = \n| 体重 = \n| スリーサイズ = \n| 靴のサイズ = \n| 合格期 = \n| 所属ユニット = \n| 選抜回数 = \n| サイリウム = \n}}', | ||
ownline: true | |||
} | } | ||
} | } | ||
}, | }, | ||
{ | { | ||
label: ' | label: '{{関係者情報}}', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: ' | pre: '{{関係者情報\n| 名前 = \n| 読み = \n| 役職 = \n| bgcolor = \n| 画像 = \n| ニックネーム = \n| 所属事務所 = \n| 生年月日 = \n| 出身地 = \n| 血液型 = \n| 身長 = \n| 体重 = \n}}', | ||
ownline: true | |||
} | } | ||
} | } | ||
}, | }, | ||
{ | { | ||
label: '{{ | label: '{{シングル情報}}', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: '{{ | pre: '{{シングル情報\n| タイトル = \n| アーティスト = \n| 通算枚数 = \n| 区分 = シングル\n| 画像 = \n| 発売日 = \n| レーベル = \n| 選抜人数 = \n| 販売形態 = \n| 週間ランキング = \n| 初週売上 = \n| 月間ランキング = \n| 初月売上 = \n| 年間ランキング = \n| 売上枚数 = \n| 前作 = \n| 次作 = \n}}', | ||
ownline: true | |||
} | } | ||
} | } | ||
}, | }, | ||
{ | { | ||
label: '{{ | label: '{{アルバム情報}}', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: '{{ | pre: '{{アルバム情報\n| タイトル = \n| アーティスト = \n| 通算枚数 = \n| 区分 = シングル\n| 画像 = \n| 発売日 = \n| レーベル = \n| 選抜人数 = \n| 販売形態 = \n| 週間ランキング = \n| 初週売上 = \n| 月間ランキング = \n| 初月売上 = \n| 年間ランキング = \n| 売上枚数 = \n| 前作 = \n| 次作 = \n}}', | ||
ownline: true | |||
} | } | ||
} | } | ||
}, | }, | ||
{ | { | ||
label: '{{ | label: '{{楽曲情報}}', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: '{{ | pre: '{{楽曲情報\n| タイトル = \n| 名義 = \n| 画像 = \n| 作詞 = \n| 作曲 = \n| 編曲 = \n| YouTube = \n| MV監督 = \n| 振付 = \n| タイアップ = \n}}', | ||
ownline: true | ownline: true | ||
} | |||
} | |||
}, | |||
{ | |||
label: '[[ファイル:<ファイル名>|250px]]', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '[[ファイル:', | |||
post: '|250px]]' | |||
} | } | ||
} | } | ||
101行目: | 98行目: | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: '{{書きかけ| | pre: '{{書きかけ}}', | ||
ownline: true | |||
} | |||
} | |||
}, | |||
{ | |||
label: '{{編集者希望}}', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '{{編集者希望}}', | |||
ownline: true | |||
} | |||
} | |||
}, | |||
{ | |||
label: '{{情報希望}}', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '{{情報希望|', | |||
post: '}}', | post: '}}', | ||
ownline: true | |||
} | |||
} | |||
}, | |||
{ | |||
label: '{{更新}}', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '{{更新}}', | |||
ownline: true | |||
} | |||
} | |||
}, | |||
{ | |||
label: '{{雑多}}', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '{{雑多}}', | |||
ownline: true | ownline: true | ||
} | } | ||
112行目: | 149行目: | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: '{{発売前| | pre: '{{発売前|', | ||
post: '}}', | post: '}}', | ||
ownline: true | ownline: true | ||
123行目: | 160行目: | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: '{{予定 | pre: '{{予定}}', | ||
ownline: true | |||
} | |||
} | |||
}, | |||
{ | |||
label: '{{最新の出来事}}', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '{{最新の出来事}}', | |||
ownline: true | |||
} | |||
} | |||
}, | |||
{ | |||
label: '{{最終更新}}', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '{{最終更新}}', | |||
ownline: true | ownline: true | ||
} | } | ||
134行目: | 190行目: | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: '{{出典明記| | pre: '{{出典明記}}', | ||
ownline: true | |||
} | |||
} | |||
}, | |||
{ | |||
label: '{{編集合戦}}', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '{{編集合戦}}', | |||
ownline: true | |||
} | |||
} | |||
}, | |||
{ | |||
label: '{{保護中}}', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '{{保護中|reason=', | |||
post: '}}', | post: '}}', | ||
ownline: true | |||
} | |||
} | |||
}, | |||
] | |||
}, | |||
'templates': { | |||
'layout': 'characters', | |||
'label': '編集用テンプレート', | |||
'characters': [ | |||
{ | |||
label: '{{要出典}}', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '{{要出典}}' | |||
} | |||
} | |||
}, | |||
{ | |||
label: '{{要出典|}}', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '{{要出典|', | |||
post: '}}' | |||
} | |||
} | |||
}, | |||
{ | |||
label: '<ref></ref>', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '<ref>', | |||
post: '</ref>' | |||
} | |||
} | |||
}, | |||
{ | |||
label: '<ref name=""></ref>', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '<ref name="">', | |||
post: '</ref>' | |||
} | |||
} | |||
}, | |||
{ | |||
label: '{{出典 Google+|url= |by= |date= }}', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '{{出典 Google+|url=', | |||
post: '|by=|date=}}' | |||
} | |||
} | |||
}, | |||
{ | |||
label: '{{注釈}}', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '{{注釈|', | |||
post: '}}' | |||
} | |||
} | |||
}, | |||
] | |||
}, | |||
'footers': { | |||
'layout': 'characters', | |||
'label': 'フッタ要素', | |||
'characters': [ | |||
{ | |||
label: '== 注釈 ==', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '== 注釈 ==\n<references group="注釈" />', | |||
ownline: true | |||
} | |||
} | |||
}, | |||
{ | |||
label: '== 出典 ==', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '== 出典 ==\n<references />', | |||
ownline: true | ownline: true | ||
} | } | ||
141行目: | 308行目: | ||
}, | }, | ||
{ | { | ||
label: '{{ | label: '{{DEFAULTSORT:}}', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: '{{ | pre: '{{DEFAULTSORT:', | ||
post: '}}', | post: '}}', | ||
ownline: true | ownline: true | ||
152行目: | 319行目: | ||
}, | }, | ||
{ | { | ||
label: ' | label: '[[カテゴリ:]]', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: ' | pre: '[[カテゴリ:', | ||
post: ' | post: ']]', | ||
ownline: true | ownline: true | ||
} | } | ||
163行目: | 330行目: | ||
}, | }, | ||
{ | { | ||
label: ' | label: '[[jawp:]]', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: ' | pre: '[[jawp:', | ||
post: ' | post: ']]', | ||
ownline: true | ownline: true | ||
} | } | ||
174行目: | 341行目: | ||
}, | }, | ||
{ | { | ||
label: ' | label: '[[akb49:]]', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: ' | pre: '[[akb49:', | ||
post: ' | post: ']]', | ||
ownline: true | ownline: true | ||
} | } | ||
185行目: | 352行目: | ||
}, | }, | ||
{ | { | ||
label: ' | label: '[[stage48:]]', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: ' | pre: '[[stage48:', | ||
post: ' | post: ']]', | ||
ownline: true | ownline: true | ||
} | } | ||
196行目: | 363行目: | ||
}, | }, | ||
{ | { | ||
label: ' | label: '[[akb48wikia:]]', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: ' | pre: '[[akb48wikia:', | ||
post: ' | post: ']]', | ||
ownline: true | ownline: true | ||
} | } | ||
} | } | ||
}, | }, | ||
{ | { | ||
label: '[[nogipedia:]]', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '[[nogipedia:', | |||
post: ']]', | |||
ownline: true | |||
} | |||
} | |||
}, | }, | ||
{ | { | ||
label: '[[baidu:]]', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '[[baidu:', | |||
post: ']]', | |||
ownline: true | |||
} | |||
} | |||
}, | }, | ||
{ | { | ||
label: '[[namuwiki:]]', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '[[namuwiki:', | |||
post: ']]', | |||
ownline: true | |||
} | |||
} | |||
}, | }, | ||
] | ] | ||
246行目: | 420行目: | ||
name: { html: 'グループ<br>グループ<i>n</i>' }, | name: { html: 'グループ<br>グループ<i>n</i>' }, | ||
example: { html: 'AKB48' }, | example: { html: 'AKB48' }, | ||
description: { html: ' | description: { html: '所属グループ' } | ||
}, | }, | ||
{ | { | ||
name: { html: 'チーム<br>チーム<i>n</i>' }, | name: { html: 'チーム<br>チーム<i>n</i>' }, | ||
example: { html: ' | example: { html: 'チームA、研究生' }, | ||
description: { html: '「グループ」に対応する所属チーム | description: { html: '「グループ」に対応する所属チーム' } | ||
}, | }, | ||
{ | { | ||
name: { html: ' | name: { html: '元グループ<br>元グループ<i>n</i>' }, | ||
example: { html: '' }, | example: { html: 'AKB48' }, | ||
description: { html: ' | description: { html: '過去の所属グループ<br>現在48・46グループに所属している場合は入力しない' } | ||
}, | }, | ||
{ | { | ||
404行目: | 573行目: | ||
/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar . . . */ | /* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar . . . */ | ||
if ( $.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ] ) !== -1 ) { | if ( $.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ] ) !== -1 ) { | ||
mw.loader.using( 'user.options' | mw.loader.using( 'user.options').then( function() { | ||
if ( mw.user.options.get( 'usebetatoolbar | if ( mw.user.options.get( 'usebetatoolbar' ) == 1 ) { | ||
$.when( | $.when( | ||
mw.loader.using( 'ext.wikiEditor | mw.loader.using( 'ext.wikiEditor' ), | ||
$.ready | $.ready | ||
).then( customizeToolbar ); | ).then( customizeToolbar ); | ||
413行目: | 582行目: | ||
} ); | } ); | ||
} | } | ||
// </nowiki> |