MediaWiki:Gadget-Emoji.js:修订间差异
来自Limbo Wiki Mirror
小无编辑摘要 |
小无编辑摘要 |
||
| 第1行: | 第1行: | ||
$(function($,mw){ | $(function($,mw){ | ||
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ){ | |||
mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) { | mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) { | ||
$textarea.wikiEditor( 'addToToolbar',{ | $textarea.wikiEditor( 'addToToolbar',{ | ||
| 第21行: | 第22行: | ||
}); | }); | ||
}); | }); | ||
}(jQuery,mediaWiki)); | }}(jQuery,mediaWiki)); | ||
2022年4月4日 (一) 15:20的版本
$(function($,mw){
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ){
mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) {
$textarea.wikiEditor( 'addToToolbar',{
section: 'advanced',
group: 'insert',
tools: {
buttonId: {
label: 'Emoji',
type: 'button',
oouiIcon: 'emoji',//OpenMoji
action: {
type: 'encapsulate',
options: {
pre: '<!-- ',
peri: '注释',
post: ' -->'
}
}
}
}
});
});
}}(jQuery,mediaWiki));
