这是林泊百科的迁移技术测试站点,所有改动不会同步到林泊百科上,此站点将会在正式迁移后关闭,请勿存放重要数据

MediaWiki:Gadget-Emoji.js:修订间差异

来自Limbo Wiki
跳转到导航 跳转到搜索
Sam0324留言 | 贡献
无编辑摘要
Sam0324留言 | 贡献
无编辑摘要
 
(未显示同一用户的24个中间版本)
第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: 'advanced',
section: 'advanced',
        group: 'format',
group: 'insert',
        tools: {
tools: {
            buttonId: {
buttonId: {
                label: 'Comment visible only for editors',
label: 'Emoji',
                type: 'button',
type: 'button',
                action: {
oouiIcon: 'emoji',//OpenMoji
                    type: 'encapsulate',
action: {
                    options: {
type: 'encapsulate',
                        pre: '<!-- ',
options: {
                        peri: 'Insert comment here',
pre: '<!-- ',
                        post: ' -->'
peri: '注释',
                    }
post: ' -->'
                }
}
            }
}
        }
}
    });
}
});});
});
});
}}(jQuery,mediaWiki));

2022年4月4日 (一) 15: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));