MediaWiki:Gadget-Emoji.js:修订间差异
来自Limbo Wiki
小无编辑摘要 |
小无编辑摘要 |
||
(未显示同一用户的8个中间版本) | |||
第1行: | 第1行: | ||
$(function() {mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) { | $(function($,mw){ | ||
if (['edit','submit'].indexOf(mw.config.get('wgAction')) !== -1 ){ | |||
mw.hook( 'wikiEditor.toolbarReady' ).add(function ($textarea) { | |||
$textarea.wikiEditor( 'addToToolbar',{ | $textarea.wikiEditor( 'addToToolbar',{ | ||
section: ' | section: 'advanced', | ||
group: ' | group: 'insert', | ||
tools: { | tools: { | ||
buttonId: { | buttonId: { | ||
label: 'Emoji', | label: 'Emoji', | ||
type: 'button', | type: 'button', | ||
oouiIcon: 'emoji',//OpenMoji | |||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
第18行: | 第21行: | ||
} | } | ||
}); | }); | ||
});}); | }); | ||
}}(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));