imported>=海豚= |
imported>Leogong2019 |
第1行: |
第1行: |
| /* Generic code */
| | <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;"><!-- |
| window.customizeToolbar = function( customizer ) {
| | -->{{#if: {{{post|{{{后|}}}}}}||{{#if: {{{pre|{{{前|}}}}}}|{{{pre|{{{前|}}}}}}<br />}}}}<!-- |
| /* Check if we are in edit mode and the required modules are available and then customize the toolbar */
| | -->{{#if: {{{1|{{{本条目描述|}}}}}}|<!-- |
| if ( $.inArray( mw.config.get( 'wgAction' ), ['edit', 'submit'] ) !== -1 ) {
| | -->本{{#if:{{{section|}}}|章节|{{#switch:{{NAMESPACENUMBER}}|0=条目|14=分类|页}}}}介绍的是{{{1|{{{本条目描述|}}}}}}。}}<!-- |
| if ( mw.user.options.get('usebetatoolbar') ) {
| | --> 关于{{#if:{{{2|{{{另一含义|}}}}}}|{{{2|{{{另一含义|}}}}}}|{{#if:{{{消歧义页|}}}|{{{消歧义页|}}}|{{{3}}}}}的其他意思}},请见{{#if:{{{3|{{{另一条目名|{{{消歧义页|}}}}}}}}}|“'''[[{{{3|{{{另一条目名|{{{消歧义页|}}}}}}}}}]]''' ”{{#ifeq:{{{4|}}}|and|和{{#if:{{{5|}}}|“'''[[{{{5}}}]]''' ”|{{Error|错误:没有指定其他用法1的链接2}}}}}}|{{Error|错误:没有指定其他用法1的链接}}}}。<!-- |
| mw.loader.using( 'ext.wikiEditor-ui-toolbar', function () {
| | -->{{#if:{{{2|}}}|{{#if:{{{4|}}}|<!-- |
| $(document).ready( function() {
| | -->{{#ifeq:{{{4|}}}|and||<!-- "and" 是特殊词,请不要将本模版用于“关于and……” |
| customizer.call( $( '#wpTextbox1' ) );
| | -->关于{{#ifeq:{{{4}}}|1|{{{5}}}的其他意思|{{{4}}}}} ,请见{{#if:{{{5|}}}|“'''[[{{{5}}}]]''' ”{{#ifeq:{{{6|}}}|and|和{{#if:{{{7|}}}|“'''[[{{{7}}}]]''' ”|{{Error|错误:没有指定其他用法2的链接2}}}}}}|{{Error|错误:没有指 定 其他用法2的链接}}}}。}}<!-- |
| } );
| | -->{{#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 */
| | -->}}<!-- |
| customizeToolbar( function() {
| | -->}}<!-- |
| this.wikiEditor('addToToolbar', {
| | -->}}}}<!-- |
| 'section': 'main',
| | -->{{#if: {{{post|{{{后|}}}}}}|<br />{{{post|{{{后|}}}}}}}}<!-- |
| 'group': 'insert',
| | --></th></tr></table></div></includeonly><noinclude> |
| 'tools': {
| | {{Documentation}} |
| 'category': {
| | </noinclude> |
| label: '分类',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/00/Structure_du_site_ic%C3%B4ne.svg/23px-Structure_du_site_ic%C3%B4ne.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/1/1a/Toolbaricon_strike.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "<s>",
| |
| post: "</s>"
| |
| }
| |
| }
| |
| },
| |
| | |
| 'underline': {
| |
| label: '下划线',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/thumb/9/99/Gnome-format-text-underline.svg/22px-Gnome-format-text-underline.svg.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "<u>",
| |
| post: "</u>"
| |
| }
| |
| }
| |
| },
| |
| 'quote': {
| |
| label: ' 块引用',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/2/2f/Toolbaricon_quote_1.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "<blockquote>",
| |
| post: "</blockquote>"
| |
| }
| |
| }
| |
| },
| |
| | |
| 'justify-left': {
| |
| label: ' 左对齐',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/8/81/Toolbaricon_justify-left.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/c/ce/Gnome-format-justify-center.svg/23px-Gnome-format-justify-center.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/f/fb/Gnome-format-justify-right.svg/23px-Gnome-format-justify-right.svg.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "<div style=\"text-align: right;\">",
| |
| post: "</div>"
| |
| }
| |
| }
| |
| },
| |
| | |
| 'indent-more': {
| |
| label: ' 定 义',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/thumb/8/84/Gnome-format-indent-more.svg/23px-Gnome-format-indent-more.svg.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: ";"
| |
| }
| |
| }
| |
| },
| |
| 'source': {
| |
| label: '源代码',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/thumb/1/1b/Toolbaricon_source.svg/22px-Toolbaricon_source.svg.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "<source lang=\"text\">",
| |
| post: '</source>'
| |
| }
| |
| }
| |
| }
| |
| }
| |
| } );
| |
| | |
| this.wikiEditor('addToToolbar', {
| |
| 'section': 'advanced',
| |
| 'group': 'insert',
| |
| 'tools': {
| |
| 'math': {
| |
| label: '数学公式',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/thumb/c/c2/Nuvola_apps_edu_mathematics-p.svg/22px-Nuvola_apps_edu_mathematics-p.svg.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "<math>",
| |
| periMsg: '插入数学公式',
| |
| post: "</math>"
| |
| }
| |
| }
| |
| },
| |
| | |
| 'template': {
| |
| label: ' 模板',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/thumb/9/9a/Curly_Brackets.svg/22px-Curly_Brackets.svg.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "{\{",
| |
| periMsg: '模板名称',
| |
| post: "}}"
| |
| }
| |
| }
| |
| },
| |
| | |
| 'hidden': {
| |
| label: '注释或隐藏文字',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/1/11/Toolbaricon_hiddencomment.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "<!-- ",
| |
| post: " -->"
| |
| }
| |
| }
| |
| },
| |
| | |
| 'hline': {
| |
| label: ' 水平线',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/2/2c/Norwegian_ndash_sign.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "----",
| |
| ownline: true
| |
| }
| |
| }
| |
| },
| |
| | |
| 'hans-hant': {
| |
| label: '繁简转换',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/9/9d/Toolbaricon_sr.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "-{",
| |
| periMsg: '转换文字',
| |
| post: "}-"
| |
| }
| |
| }
| |
| },
| |
| | |
| 'mediafile': {
| |
| label: '媒体文件链接',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/6/65/Toolbaricon_media.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "[[Media:",
| |
| periMsg: 'Example.ogg',
| |
| post: "]]"
| |
| }
| |
| }
| |
| },
| |
| | |
| 'references': {
| |
| label: '参考文献区',
| |
| type: 'button',
| |
| icon: '//upload.wikimedia.org/wikipedia/commons/8/8d/Wikieditor-references.png',
| |
| action: {
| |
| type: 'encapsulate',
| |
| options: {
| |
| pre: "\n==参考文献==\n{\{reflist}}\n",
| |
| }
| |
| }
| |
| }
| |
| }
| |
| } );
| |
| } );
| |
| }
| |