MediaWiki:Gadget-Emoji.js:修订间差异
来自Limbo Wiki
小无编辑摘要 |
小无编辑摘要 |
||
(未显示同一用户的2个中间版本) | |||
第1行: | 第1行: | ||
$(function($,mw){ | $(function($,mw){ | ||
mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) { | if (['edit','submit'].indexOf(mw.config.get('wgAction')) !== -1 ){ | ||
mw.hook( 'wikiEditor.toolbarReady' ).add(function ($textarea) { | |||
$textarea.wikiEditor( 'addToToolbar',{ | $textarea.wikiEditor( 'addToToolbar',{ | ||
section: 'advanced', | section: 'advanced', | ||
第21行: | 第22行: | ||
}); | }); | ||
}); | }); | ||
}(jQuery,mediaWiki)); | }}(jQuery,mediaWiki)); |
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));