User:Πrate/customEdittools.js

注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google ChromeFirefoxMicrosoft EdgeSafari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。

/*
//define buttons 定義按鈕與下拉菜單
addEditButton('btnInterLink',{
	src        : 'c/c0/Button_link.png',
	tagOpen    : '[[',
	sampleText : '連結名稱',
	tagClose   : ']]',
	speedTip   : '內部連結'
});
addEditButton('btnTemplateLink',{
	src        : "9/97/Template_button.png",
	tagOpen    : "{{",
	sampleText : "模板名",
	tagClose   : "}}",
	speedTip   : "應用模板"
});
addEditButton('btnCategory',{
	src        : "b/b4/Button_category03.png",
	tagOpen    : "[[Category:",
	sampleText : wgULS("分类名","分類名"),
	tagClose   : "]]",
	speedTip   : "分類"
});
addEditButton('btnRedirect',{
	src        : "4/47/Button_redir.png",
	tagOpen    : "#REDIRECT [[",
	sampleText : wgULS("目标条目名","目標條目名"),
	tagClose   : "]]",
	speedTip   : "重定向"
});
addEditButton('btnImage',{
	src        : 'f/f0/Image_icon.png',
	tagOpen    : '[[File:',
	sampleText : 'Example.jpg',
	tagClose   : ']]',
	speedTip   : '嵌入圖像'
});
var __temp="\nFile:|"+wgULS("图片题注","圖片題注");
addEditButton('btnGallery',{
	src        : "9/9e/Btn_toolbar_gallery.png",
	tagOpen    : "<gallery>",
	sampleText : __temp+__temp,
	tagClose   : "\n</gallery>",
	speedTip   : "畫廊"
});
addEditButton('btnMath',{
	src        : '5/5b/Math_icon.png',
	tagOpen    : '<math>',
	sampleText : '插入數學公式',
	tagClose   : '</math>',
	speedTip   : '插入數學公式(LaTeX)'
});
addEditButton('btnNowiki',{
	src        : '8/82/Nowiki_icon.png',
	tagOpen    : '<nowiki>',
	sampleText : '插入非格式文本',
	tagClose   : '</nowiki>',
	speedTip   : '插入非格式文本'
});
addEditButton('btnSimpleSignature',{
	src        : 'd/d8/Button_sig_zh.png',
	tagOpen    : '--\'\'\'\{\{lang|ja|[\[User:Πrate|百楽兎]\]}\}\'\'\'\ ~~\~~\~',
	sampleText : '',
	tagClose   : '',
	speedTip   : '簡易簽名'
});
addEditButton('btnSignature',{
	src        : '4/4f/Button_sig_%28zh%29.png',
	tagOpen    : '--[\[File:百楽兎.png]\]\'\'\'\{\{lang|ja|[\[User:Πrate|百楽兎]\]}\}\'\'\'\ ~~\~~\~',
	sampleText : '',
	tagClose   : '',
	speedTip   : '個人簽名'
});
addEditButton('btnHr',{
	src        : 'a/a4/H-line_icon.png',
	tagOpen    : '\n----\n',
	sampleText : '',
	tagClose   : '',
	speedTip   : "水平線"
});
addEditButton('btnBr',{
	src        : "1/13/Button_enter.png",
	tagOpen    : "<br />",
	sampleText : "",
	tagClose   : "",
	speedTip   : "換行"
});
addEditButton('btnBold',{
	src        : '6/6f/Bold_icon.png',
	tagOpen    : '\'\'\'',
	sampleText : '粗体',
	tagClose   : '\'\'\'',
	speedTip   : '粗体'
});
__temp=wgULS("下划线","下劃線");
addEditButton('btnUnderline',{
	src        : 'f/fd/Button_underline.png',
	tagOpen    : '<span style="text-decoration: underline;">',
	sampleText : __temp,
	tagClose   : '</span>',
	speedTip   : __temp
});
__temp=wgULS("删除线","刪除線");
addEditButton('btnStrike',{
	src        : "c/c9/Button_strike.png",
	tagOpen    : "<del>",
	sampleText : __temp,
	tagClose   : "</del>",
	speedTip   : __temp
});
addEditButton('btnAlignCenter',{
	src        : "5/5f/Button_center.png",
	tagOpen    : '<div style="text-align: center;">',
	sampleText : "置中",
	tagClose   : "</div>",
	speedTip   : "置中"
});
__temp=wgULS("上标","上標");
addEditButton('btnSup',{
	src        : "6/6a/Button_sup_letter.png",
	tagOpen    : "<sup>",
	sampleText : __temp,
	tagClose   : "</sup>",
	speedTip   : __temp
});
__temp=wgULS("下标","下標");
addEditButton('btnSub',{
	src        : "a/aa/Button_sub_letter.png",
	tagOpen    : "<sub>",
	sampleText : __temp,
	tagClose   : "</sub>",
	speedTip   : __temp
});
addEditButton('btnBig',{
	src        : "5/56/Button_big.png",
	tagOpen    : '<span style="font-size:larger;">',
	sampleText : "放大",
	tagClose   : "</span>",
	speedTip   : "放大"
});
__temp=wgULS("缩小","縮小");
addEditButton('btnSmall',{
	src        : "5/58/Button_small.png",
	tagOpen    : '<span style="font-size:smaller;">',
	sampleText : __temp,
	tagClose   : "</span>",
	speedTip   : __temp
});
addEditButton('btnColor',{
	src        : "5/59/Button_replace.png",
	tagOpen    : '{{fontcolor|前景色|',
	sampleText : "文字",
	tagClose   : "}}",
	speedTip   : "彩色文本"
});
addEditButton('btnSpecialChar',{
	src        : 'b/b6/Vjazyce-button.png',
	tagOpen    : '<span style="font-family: Arial Unicode MS;">',
	sampleText : "特殊字元",
	tagClose   : "</span>",
	speedTip   : "特殊字元"
});
addEditButton('btnCode',{
	src        : "2/23/Button_code.png",
	tagOpen    : "<code><nowiki>",
	sampleText : wgULS("代码","代碼"),
	tagClose   : "</nowiki></code>",
	speedTip   : "代碼文本"
});
addEditButton('btnSource',{
	src        : "d/d2/Button_source.png",
	tagOpen    : '<source lang="text">',
	sampleText : wgULS("源代码","源代碼"),
	tagClose   : "<\/source>",
	speedTip   : "高亮代碼"
});
__temp=wgULS("参考","參考");
addEditButton('btnRef',{
	src        : "c/c4/Button_ref.png",
	tagOpen    : "<ref>",
	sampleText : __temp,
	tagClose   : "</ref>",
	speedTip   : __temp
});
__temp=wgULS("同项参考","同項參考");
addEditButton('btnRef2',{
	src        : "c/cf/Button_ref_adv.png",
	tagOpen    : '<ref name="">',
	sampleText : __temp,
	tagClose   : '</ref>',
	speedTip   : __temp,
	width      : 12
});
addEditButton('btnReferences',{
	src        : "f/fe/Button_refs.png",
	tagOpen    : '\n==注釋==\n<references />\n\n',
	sampleText : '',
	tagClose   : '',
	speedTip   : "注釋"
});
delete __temp;

addDropdownMenu("articleEdit","條目編輯",[
	{
		id         : "elink",
		text       : "外部連結",
		tagOpen    : "\n==外部連結==\n*[",
		sampleText : "網頁地址 網頁說明",
		tagClose   : "]\n"
	},
	{ 
		id         : "seealso",
		text       : "參見章節",
		tagOpen    : "\n==參見==\n*[[",
		sampleText : "參見地址",
		tagClose   : "]]\n"
	},
	{ 
		id         : "Disambig",
		text       : "消歧義頁",
		tagOpen    : "{\{disambig}\}\n'''{{PAGENAME}}'''可以指:\n",
		sampleText : "*[[歧義1]],描述1\n*[[歧義2]],描述2",
		tagClose   : ""
	},
	{ 
		id         : "otheruses",
		text       : "條目消歧義",
		tagOpen    : "{\{Otheruses|",
		sampleText : "subject=本頁主題描述|other=同名或類似名的其它條目描述|條目名稱",
		tagClose   : "}\}\n"
	},
	{ 
		id         : "noconv",
		text       : "不轉換",
		tagOpen    : "-\{" ,
		sampleText : "文字",
		tagClose   : "}\-"
	},
	{ 
		id         : "noteTA",
		text       : "AT轉換",
		tagOpen    : '{\{noteTA|',
		sampleText : 'T=zh-cn:;zh-tw:;|zh-cn:;zh-tw:;',
		tagClose   : '}\}\n'
	},
	{ 
		id         : "reqimage",
		text       : "圖片請求",
		tagOpen    : "{\{Reqimage}\}\n",
		sampleText : "",
		tagClose   : ""
	},
	{ 
		id         : "fact",
		text       : "來源請求",
		tagOpen    : "{\{Fact|",
		sampleText : "文字",
		tagClose   : "}\}"
	},
	{ 
		id         : "cleanup",
		text       : "條目清理",
		tagOpen    : "{\{Cleanup|time={\{subst:CURRENTYEAR}\}\-\{\{subst:CURRENTMONTH}\}\-\{\{subst:CURRENTDAY2}\}\}\}\n",
		sampleText : "",
		tagClose   : ""
	},
	{ 
		id         : "rewrite",
		text       : "重寫",
		tagOpen    : "{\{Rewrite}\}\n",
		sampleText : "",
		tagClose   : ""
	},
	{ 
		id         : "substub",
		text       : "小小作品",
		tagOpen    : "{\{Substub|time={\{subst:CURRENTYEAR}\}\-\{\{subst:CURRENTMONTH}\}\-\{\{subst:CURRENTDAY2}\}\}\}\n",
		sampleText : "",
		tagClose   : ""
	},
	{ 
		id         : "expand",
		text       : "需要擴充",
		tagOpen    : "{\{Expand|time={\{subst:CURRENTYEAR}\}\-\{\{subst:CURRENTMONTH}\}\-\{\{subst:CURRENTDAY2}\}\}\}\n",
		sampleText : "",
		tagClose   : ""
	},
	{ 
		id         : "disputed",
		text       : "正確性存疑",
		tagOpen    : "{\{subst:User:Πrate/Lab\}\}\n",
		sampleText : "",
		tagClose   : ""
	},
	{ 
		id         : "copyvio",
		text       : "侵權",
		tagOpen    : "{\{Copyvio|m={\{subst:CURRENTMONTH}\}|url=",
		sampleText : "網址",
		tagClose   : "}\}'''{\{lang|ja|[\[User:Πrate|百楽兎]\]}\}''' ~~~~~"
	},
	{ 
		id         : "lrm",
		text       : "LRM符",
		tagOpen    : "\u200E",
		sampleText : "",
		tagClose   : ""
	},
	{ 
		id         : "wikitable",
		text       : "Wikitable",
		tagOpen    : 'class="wikitable"',
		sampleText : "",
		tagClose   : ""
	},
	{ 
		id         : "nowrap",
		text       : "NoWrap",
		tagOpen    : 'nowrap|',
		sampleText : "",
		tagClose   : ""
	},
	{ 
		id         : "marginauto",
		text       : "Margin Auto",
		tagOpen    : 'style="margin: auto"',
		sampleText : "",
		tagClose   : ""
	}
]);

addDropdownMenu("langTags","非中文標明",[
	{ 
		id         : "ja",
		text       : "日語",
		tagOpen    : "{\{lang|ja|",
		sampleText : wgULS("日语","日語"),
		tagClose   : "}\}"
	},
	{ 
		id         : "de",
		text       : wgULS("德语","德語"),
		tagOpen    : "{\{lang|de|",
		sampleText : wgULS("德语","德語"),
		tagClose   : "}\}"
	},
	{                
		id         : "fr",
		text       : "法語",
		tagOpen    : "{\{lang|fr|",
		sampleText : wgULS("法语","法語"),
		tagClose   : "}\}"
	},
	{ 
		id         : "es",
		text       : "西班牙語",
		tagOpen    : "{\{lang|es|",
		sampleText : wgULS("西班牙语","西班牙語"),
		tagClose   : "}\}"
	},
	{ 
		id         : "ar",
		text       : "阿拉伯語",
		tagOpen    : "{\{lang|ar|",
		sampleText : wgULS("阿拉伯语","阿拉伯語"),
		tagClose   : "\u200E}\}"
	},
	{ 
		id         : "ru",
		text       : "俄語",
		tagOpen    : "{\{lang|ru|",
		sampleText : wgULS("俄语","俄語"),
		tagClose   : "}\}"
	},
	{ 
		id         : "he",
		text       : "希伯來語",
		tagOpen    : "{\{lang|he|",
		sampleText : wgULS("希伯来语","希伯來語"),
		tagClose   : "\u200E}\}"
	},
	{ 
		id         : "el",
		text       : "希臘語",
		tagOpen    : "{\{lang|el|",
		sampleText : wgULS("希腊语","希臘語"),
		tagClose   : "}\}"
	},
	{ 
		id         : "ko",
		text       : "韓語",
		tagOpen    : "{\{lang|ko|",
		sampleText : wgULS("韩语","韓語"),
		tagClose   : "}\}"
	},
	{ 
		id         : "IPA",
		text       : "IPA",
		tagOpen    : "{\{IPA|",
		sampleText : "IPA",
		tagClose   : "}\}"
	},
	{ 
		id         : "langcode",
		text       : "其他語言",
		tagOpen    : "{\{lang|"+wgULS("在此填上语言代码|","在此填上語言代碼|"),
		sampleText : wgULS("其他语言","其他語言"),
		tagClose   : "}\}"
	}
]);
*/