imported>=海豚= |
imported>Leogong2019 |
第1行: |
第1行: |
| // <nowiki>
| | <includeonly><div class="notice dablink" style="font-size: small; margin: 1em; padding: 0.2em;"><table style="width: 100%;"><tr style="vertical-align: top; text-align: left;"><th style="width: 32px; position: relative; top: {{#if: {{{offset|}}}|{{{offset|}}}|-2}}px;"><img src="{{filepath:Disambig_gray.svg|26}}" /></th><th style="font-weight: inherit;"><!-- |
| /* Generic code */
| | -->{{#if: {{{post|{{{后|}}}}}}||{{#if: {{{pre|{{{前|}}}}}}|{{{pre|{{{ 前|}}}}}}<br />}}}}<!-- |
| window.customizeToolbar = function( customizer ) {
| | -->{{#if: {{{1|{{{本条目描述|}}}}}}|<!-- |
| /* Check if we are in edit mode and the required modules are available and then customize the toolbar */
| | -->本{{#if:{{{section|}}}|章节|{{#switch:{{NAMESPACENUMBER}}|0=条目|14=分类|页}}}}介绍的是{{{1|{{{本条目描述|}}}}}}。}}<!-- |
| if ( $.inArray( mw.config.get( 'wgAction' ), ['edit', 'submit'] ) !== -1 ) {
| | --> 关于{{#if:{{{2|{{{另一含义|}}}}}}|{{{2|{{{另一含义|}}}}}}|{{#if:{{{消歧义页|}}}|{{{消歧义页|}}}|{{{3}}}}}的其他意思}},请见{{#if:{{{3|{{{另一条目名|{{{消歧义页|}}}}}}}}}|“'''[[{{{3|{{{另一条目名|{{{消歧义页|}}}}}}}}}]]''' ”{{#ifeq:{{{4|}}}|and|和{{#if:{{{5|}}}|“'''[[{{{5}}}]]''' ”|{{Error|错误:没有指定其他用法1的链接2}}}}}}|{{Error|错误:没有指定其他 用 法1的链接}}}}。<!-- |
| if ( mw.user.options.get('usebetatoolbar') ) {
| | -->{{#if:{{{2|}}}|{{#if:{{{4|}}}|<!-- |
| mw.loader.using( 'ext.wikiEditor', function () {
| | -->{{#ifeq:{{{4|}}}|and||<!-- "and" 是特殊词,请不要将本模版用于“关于and……” |
| $(document).ready( function() {
| | -->关于{{#ifeq:{{{4}}}|1|{{{5}}}的其他意思|{{{4}}}}} ,请见{{#if:{{{5|}}}|“'''[[{{{5}}}]]''' ”{{#ifeq:{{{6|}}}|and|和{{#if:{{{7|}}}|“'''[[{{{7}}}]]''' ”|{{Error|错误:没有指定其他用法2的链接2}}}}}}|{{Error|错误:没有指定其他用法2的链接}}}}。}}<!-- |
| customizer.call( $( '#wpTextbox1' ) );
| | -->{{#if:{{{6|}}}|<!-- |
| } );
| | -->{{#ifeq:{{{6|}}}|and||<!-- |
| } );
| | -->关于{{#ifeq:{{{6}}}|1|{{{7}}}的其他意思|{{{6}}}}} ,请见{{#if:{{{7|}}}|“'''[[{{{7}}}]]''' ”{{#ifeq:{{{8|}}}|and|和{{#if:{{{9|}}}|“'''[[{{{9}}}]]''' ”|{{Error|错误:没有指定其他用法3的链接2}}}}}}|{{Error|错误:没有指定其他用法3的链接}}}}。}}<!-- |
| }
| | -->{{#if:{{{8|}}}|<!-- |
| }
| | -->{{#ifeq:{{{8|}}}|and||<!-- |
| } | | --> 关于{{#ifeq:{{{8}}}|1|{{{9}}}的其他意思|{{{8}}}}} ,请见{{#if:{{{9|}}}|“'''[[{{{9}}}]]''' ”|{{Error|错误:没有指定其他用法4的链接}}}}。}}<!-- |
| | | -->}}<!-- |
| /* If the user manually chose this gadget */
| | -->}}<!-- |
| if ( mw.user.options.get('gadget-Edittools-vector') ) {
| | -->}}}}<!-- |
| customizeToolbar( function() {
| | -->{{#if: {{{post|{{{后|}}}}}}|<br />{{{post|{{{ 后|}}}}}}}}<!-- |
| this.wikiEditor('addToToolbar', {
| | --></th></tr></table></div></includeonly><noinclude> |
| 'section': 'main',
| | {{Documentation}} |
| 'group': 'insert',
| | </noinclude> |
| 'tools': {
| |
| 'category': {
| |
| label: '分类',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/0c/VisualEditor_-_Icon_-_Tag.svg/24px-VisualEditor_-_Icon_-_Tag.svg.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "[\[Category:",
| |
| post: "]]"
| |
| }
| |
| }
| |
| }
| |
| }
| |
| } );
| |
| | |
| this.wikiEditor('addToToolbar', {
| |
| 'section': 'advanced',
| |
| 'group': 'format',
| |
| 'tools': {
| |
| 'bolditalic': {
| |
| label: '粗斜体',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/b/be/Toolbaricon_bolditalic_A.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "'''''",
| |
| periMsg: '粗斜体文字',
| |
| post: "'''''"
| |
| }
| |
| }
| |
| },
| |
| | |
| 'strikethrough': {
| |
| label: '删除线',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/72/VisualEditor_-_Icon_-_Strikethrough-s.svg/24px-VisualEditor_-_Icon_-_Strikethrough-s.svg.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "<s>",
| |
| post: "</s>"
| |
| }
| |
| }
| |
| },
| |
| | |
| 'underline': {
| |
| label: ' 下划线',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/a9/VisualEditor_-_Icon_-_Underline-u.svg/24px-VisualEditor_-_Icon_-_Underline-u.svg.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "<u>",
| |
| post: "</u>"
| |
| }
| |
| }
| |
| },
| |
| 'quote': {
| |
| label: '块引 用',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/thumb/d/d8/VisualEditor_-_Icon_-_Block-quote.svg/24px-VisualEditor_-_Icon_-_Block-quote.svg.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "<blockquote>",
| |
| post: "</blockquote>"
| |
| }
| |
| }
| |
| },
| |
| | |
| 'justify-left': {
| |
| label: '左对齐',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/7f/OOjs_UI_icon_alignLeft.svg/24px-OOjs_UI_icon_alignLeft.svg.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "<div style=\"text-align: left;\">",
| |
| post: "</div>"
| |
| }
| |
| }
| |
| },
| |
| | |
| 'justify-center': {
| |
| label: ' 居中',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/thumb/b/ba/OOjs_UI_icon_alignCenter.svg/24px-OOjs_UI_icon_alignCenter.svg.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "<div style=\"text-align: center;\">",
| |
| post: "</div>"
| |
| }
| |
| }
| |
| },
| |
| | |
| 'justify-right': {
| |
| label: ' 右对齐',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/thumb/1/13/OOjs_UI_icon_alignRight.svg/24px-OOjs_UI_icon_alignRight.svg.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "<div style=\"text-align: right;\">",
| |
| post: "</div>"
| |
| }
| |
| }
| |
| },
| |
| | |
| 'source': {
| |
| label: '源代码',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/thumb/2/2c/VisualEditor_-_Icon_-_Source.svg/24px-VisualEditor_-_Icon_-_Source.svg.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "<syntaxhighlight lang=\"text\">",
| |
| post: '</syntaxhighlight>'
| |
| }
| |
| }
| |
| }
| |
| }
| |
| } );
| |
| | |
| this.wikiEditor('addToToolbar', {
| |
| 'section': 'advanced',
| |
| 'group': 'insert',
| |
| 'tools': {
| |
| 'math': {
| |
| label: ' 数学公式',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/thumb/3/30/VisualEditor_-_Icon_-_Equation.svg/24px-VisualEditor_-_Icon_-_Equation.svg.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "<math>",
| |
| periMsg: '插入数学公式',
| |
| post: "</math>"
| |
| }
| |
| }
| |
| },
| |
| | |
| 'hidden': {
| |
| label: '注释或隐藏文字',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/thumb/d/d1/VisualEditor_-_Icon_-_Comment.svg/24px-VisualEditor_-_Icon_-_Comment.svg.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "<!-- ",
| |
| post: " -->"
| |
| }
| |
| }
| |
| },
| |
| | |
| 'hline': {
| |
| label: ' 水平线',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/0e/VisualEditor_-_Icon_-_Remove-item.svg/24px-VisualEditor_-_Icon_-_Remove-item.svg.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "----",
| |
| ownline: true
| |
| }
| |
| }
| |
| },
| |
| | |
| 'hans-hant': {
| |
| label: '繁简转换',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/thumb/6/6a/Chinese_conversion_black.svg/24px-Chinese_conversion_black.svg.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "-{",
| |
| periMsg: '转换文字',
| |
| post: "}-"
| |
| }
| |
| }
| |
| },
| |
| | |
| 'references': {
| |
| label: '参考文献区',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/thumb/f/f9/VisualEditor_-_Icon_-_References.svg/24px-VisualEditor_-_Icon_-_References.svg.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "\n==参考文献==\n{\{reflist}}\n",
| |
| }
| |
| }
| |
| }
| |
| }
| |
| } );
| |
| } );
| |
| } | |
| | |
| // </nowiki>
| |