MediaWiki:Gadget-Emoji.js:修订间差异
来自Limbo Wiki
小无编辑摘要 |
小无编辑摘要 |
||
第1行: | 第1行: | ||
$(function($,mw){ | $(function($,mw){ | ||
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ){ | 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',{ |
2022年4月4日 (一) 07:25的版本
$(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));