查看“︁MediaWiki:Gadget-Edittools-vector.js”︁的源代码
←
MediaWiki:Gadget-Edittools-vector.js
跳转到导航
跳转到搜索
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
此页面为本wiki上的软件提供界面文本,并受到保护以防止滥用。 如欲修改所有wiki的翻译,请访问
translatewiki.net
上的MediaWiki本地化项目。
您无权编辑此JavaScript页面,因为编辑此页面可能会影响所有访问者。
您可以查看和复制此页面的源代码。
// <nowiki> /* Generic code */ window.customizeToolbar = function( customizer ) { /* Check if we are in edit mode and the required modules are available and then customize the toolbar */ if ( $.inArray( mw.config.get( 'wgAction' ), ['edit', 'submit'] ) !== -1 ) { if ( mw.user.options.get('usebetatoolbar') ) { mw.loader.using( 'ext.wikiEditor', function () { $(document).ready( function() { customizer.call( $( '#wpTextbox1' ) ); } ); } ); } } }; /* If the user manually chose this gadget */ if ( mw.user.options.get('gadget-Edittools-vector') ) { customizeToolbar( function() { this.wikiEditor('addToToolbar', { 'section': 'main', 'group': 'insert', 'tools': { 'category': { label: '分类', type: 'button', oouiIcon: 'tag', 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', oouiIcon: 'strikethrough', action: { type: 'encapsulate', options: { pre: "<s>", post: "</s>" } } }, 'underline': { label: '下划线', type: 'button', oouiIcon: 'underline', action: { type: 'encapsulate', options: { pre: "<u>", post: "</u>" } } }, 'quote': { label: '块引用', type: 'button', oouiIcon: 'quotes', action: { type: 'encapsulate', options: { pre: "<blockquote>", post: "</blockquote>" } } }, 'justify-left': { label: '左对齐', type: 'button', oouiIcon: 'alignLeft', action: { type: 'encapsulate', options: { pre: "<div style=\"text-align: left;\">", post: "</div>" } } }, 'justify-center': { label: '居中', type: 'button', oouiIcon: 'alignCenter', action: { type: 'encapsulate', options: { pre: "<div style=\"text-align: center;\">", post: "</div>" } } }, 'justify-right': { label: '右对齐', type: 'button', oouiIcon: 'alignRight', action: { type: 'encapsulate', options: { pre: "<div style=\"text-align: right;\">", post: "</div>" } } }, 'source': { label: '源代码', type: 'button', oouiIcon: 'markup', action: { type: 'encapsulate', options: { pre: "<syntaxhighlight lang=\"text\">", post: '</syntaxhighlight>' } } } } } ); this.wikiEditor('addToToolbar', { 'section': 'advanced', 'group': 'insert', 'tools': { 'math': { label: '数学公式', type: 'button', oouiIcon: 'mathematics', action: { type: 'encapsulate', options: { pre: "<math>", periMsg: '插入数学公式', post: "</math>" } } }, 'hidden': { label: '注释或隐藏文字', type: 'button', oouiIcon: 'notice', action: { type: 'encapsulate', options: { pre: "<!-- ", post: " -->" } } }, 'hline': { label: '水平线', type: 'button', oouiIcon: 'subtract', action: { type: 'encapsulate', options: { pre: "----", ownline: true } } }, 'hans-hant': { label: '繁简转换', type: 'button', icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/aa/OOjs_UI_icon_LC-zh.svg/22px-OOjs_UI_icon_LC-zh.svg.png', action: { type: 'encapsulate', options: { pre: "-{", periMsg: '转换文字', post: "}-" } } }, 'references': { label: '参考文献区', type: 'button', oouiIcon: 'references', action: { type: 'encapsulate', options: { pre: "\n==参考文献==\n{\{reflist}}\n", } } } } } ); // dark mode fix $('#wikiEditor-section-advanced .group-insert a[rel=hans-hant]').addClass('skin-invert'); $('#wikiEditor-section-advanced .group-format a[rel=bolditalic]').addClass('skin-invert'); } ); } // </nowiki>
返回
MediaWiki:Gadget-Edittools-vector.js
。
导航菜单
个人工具
登录
命名空间
系统消息
讨论
English
查看
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
MediaWiki帮助
特殊页面
工具
链入页面
相关更改
页面信息