MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 8: Line 8:
//Begin all the $textarea.wikiEditor stuff
//Begin all the $textarea.wikiEditor stuff
$textarea.wikiEditor( 'addToToolbar', {
section: 'advanced',
group: 'format',
tools: {
comment: {
label: 'Comment',
type: 'button',
icon: 'https://upload.wikimedia.org/wikipedia/commons/3/37/Btn_toolbar_commentaire.png',
action: {
type: 'encapsulate',
options: {
pre: '<!-- ',
post: ' -->'
}
}
}
}
} );


$textarea.wikiEditor( 'addToToolbar', {
section: 'advanced',
group: 'format',
tools: {
hline: {
label: 'Horizontal line',
type: 'button',
icon: 'https://upload.wikimedia.org/wikipedia/commons/a/a4/H-line_icon.png',
action: {
type: 'encapsulate',
options: {
pre: '----',
ownline: true
}
}
}
}
} );
$textarea.wikiEditor( 'addToToolbar', {
section: 'advanced',
group: 'format',
tools: {
pb: {
label: '{{Ping}}',
action: {
type: 'encapsulate',
options: {
pre: '{{Ping|',
post: '}}'
}
}
}
}
} );
$textarea.wikiEditor( 'addToToolbar', {
$textarea.wikiEditor( 'addToToolbar', {
Line 86: Line 33:
}
}
} );
} );
$textarea.wikiEditor( 'addToToolbar', {
$textarea.wikiEditor( 'addToToolbar', {
section: 'templates',
section: 'extended',
group: 'mfaces',
groups: {
pages: {
list: {
katakana: {
tools: {
layout: 'characters',
templates: {
label: 'Katakana',
label: 'Templates',
characters: '{{dsa|birth=|death=}}', '{{dsa|birth=|birthphrase=|death=|deathphrase=}}', '', '', '', 'イ', 'ゥ', 'ウ', 'ェ', 'エ', 'ォ', 'オ', 'カ', 'ガ', 'キ', 'ギ', 'ク', 'グ', 'ケ', 'ゲ', 'コ', 'ゴ', 'サ', 'ザ', 'シ', 'ジ', 'ス', 'ズ', 'セ', 'ゼ', 'ソ', 'ゾ', 'タ', 'ダ', 'チ', 'ヂ', 'ッ', 'ツ', 'ヅ', 'テ', 'デ', 'ト', 'ド', 'ナ', 'ニ', 'ヌ', 'ネ', 'ノ', 'ハ', 'バ', 'パ', 'ヒ', 'ビ', 'ピ', 'フ', 'ブ', 'プ', 'ヘ', 'ベ', 'ペ', 'ホ', 'ボ', 'ポ', 'マ', 'ミ', 'ム', 'メ', 'モ', 'ャ', 'ヤ', 'ュ', 'ユ', 'ョ', 'ヨ', 'ラ', 'リ', 'ル', 'レ', 'ロ', 'ヮ', 'ワ', 'ヰ', 'ヱ', 'ヲ', 'ン', 'ヴ', 'ヵ', 'ヶ', '゛', '゜', 'ー' ]
type: 'select',
list: {
'dsa1': {
label: '{{dsa|birth=|death=}}',
action: {
type: 'encapsulate',
options: {
pre: '{{dsa|birth=',
post: '|death=}}'
}
}
},
'dsa2': {
label: '{{dsa|birth=|birthphrase=|death=|deathphrase=}}',
action: {
type: 'encapsulate',
options: {
pre: '{{dsa|birth=',
post: '|birthphrase=|death=|deathphrase=}}'
}
}
},
}
}
}
}
}
}
}
Line 99: Line 72:


$textarea.wikiEditor( 'addToToolbar', {
$textarea.wikiEditor( 'addToToolbar', {
section: 'advanced',
section: 'extended',
groups: {
groups: {
list: {
list: {
tools: {
tools: {
templates: {
templates: {
label: 'Templates',
label: 'Categories',
type: 'select',
type: 'select',
list: {
list: {
'Ping-button': {
'cPeople': {
label: '{{Ping}}',
label: 'People',
action: {
type: 'encapsulate',
options: {
pre: '[[Category:People]]'
}
}
},
'cFPeople': {
label: 'Fictional People',
action: {
type: 'encapsulate',
options: {
pre: '[[Category:Fictional People]]',
}
}
},
'cTVShows': {
label: 'Television Shows',
action: {
action: {
type: 'encapsulate',
type: 'encapsulate',
options: {
options: {
pre: '{{Ping|',
pre: '[[Category:Television Shows]]',
post: '}}'
}
}
},
'cTVSeasons': {
label: 'Television Seasons',
action: {
type: 'encapsulate',
options: {
pre: '[[Category:Television Seasons]]',
}
}
},
'cMovies': {
label: 'Movies',
action: {
type: 'encapsulate',
options: {
pre: '[[Category:Movies]]',
}
}
}
}
},
},
'Clear-button': {
'cBooks': {
label: 'Clear',
label: 'Books',
action: {
action: {
type: 'encapsulate',
type: 'encapsulate',
options: {
options: {
pre: '{{Clear}}'
pre: '[[Category:Books]]',
}
}
}
}
},
},
'Done-button': {
'cVGs': {
label: 'Done',
label: 'Video Games',
action: {
action: {
type: 'encapsulate',
type: 'encapsulate',
options: {
options: {
pre: '{{Done}}'
pre: '[[Category:Video Games]]',
}
}
}
}
}
},
}
}
}
}
Line 147: Line 155:
list: {
list: {
tools: {
tools: {
templates2: {
misc: {
label: 'Templates2',
label: 'Misc',
type: 'select',
type: 'select',
list: {
list: {
'Ping-button': {
'comments': {
label: '{{dsa|birth=|death=}}',
label: 'Comment',
action: {
type: 'encapsulate',
options: {
pre: '<!-- ',
post: ' -->'
}
}
},
'horline': {
label: 'Horizontal Line',
action: {
type: 'encapsulate',
options: {
pre: '----',
ownline: true
}
}
},
'defsort': {
label: 'Default Sort',
action: {
action: {
type: 'encapsulate',
type: 'encapsulate',
options: {
options: {
pre: '{{dsa|birth=',
pre: '{{DEFAULTSORT:',
post: '|death=}}'
post: '}}'
}
}
}
}
},
},
'Clear-button': {
'lcasetitle': {
label: '{{dsa|birth=|birthphrase=|death=|deathphrase=}}',
label: 'Lowercase title',
action: {
action: {
type: 'encapsulate',
type: 'encapsulate',
options: {
options: {
pre: '{{dsa|birth=',
pre: '{{lowercase title}}',
post: '|birthphrase=|death=|deathphrase=}}'
}
}
}
}
Line 178: Line 205:
} );
} );


$textarea.wikiEditor( 'addToToolbar', {
section: 'characters',
pages: {
emoticons: {
layout: 'characters',
label: 'Emoticons',
characters: [ ':)', ':))', ':(', '<3', ';)' ]
}
}
} );


$textarea.wikiEditor( 'addToToolbar', {
$textarea.wikiEditor( 'addToToolbar', {
Line 211: Line 228:
} );
} );


$textarea.wikiEditor( 'addToToolbar', {
section: 'templatessection',
pages: {
katakana: {
layout: 'characters',
label: 'Katakana',
characters: [  'ァ', 'ア', 'ィ', 'イ', 'ゥ', 'ウ', 'ェ', 'エ', 'ォ', 'オ', 'カ', 'ガ', 'キ', 'ギ', 'ク', 'グ', 'ケ', 'ゲ', 'コ', 'ゴ', 'サ', 'ザ', 'シ', 'ジ', 'ス', 'ズ', 'セ', 'ゼ', 'ソ', 'ゾ', 'タ', 'ダ', 'チ', 'ヂ', 'ッ', 'ツ', 'ヅ', 'テ', 'デ', 'ト', 'ド', 'ナ', 'ニ', 'ヌ', 'ネ', 'ノ', 'ハ', 'バ', 'パ', 'ヒ', 'ビ', 'ピ', 'フ', 'ブ', 'プ', 'ヘ', 'ベ', 'ペ', 'ホ', 'ボ', 'ポ', 'マ', 'ミ', 'ム', 'メ', 'モ', 'ャ', 'ヤ', 'ュ', 'ユ', 'ョ', 'ヨ', 'ラ', 'リ', 'ル', 'レ', 'ロ', 'ヮ', 'ワ', 'ヰ', 'ヱ', 'ヲ', 'ン', 'ヴ', 'ヵ', 'ヶ', '゛', '゜', 'ー' ]
}
}
} );