跳转到内容

User:Altt311/edittools.js

维基百科,自由的百科全书
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google ChromeFirefoxMicrosoft EdgeSafari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
// <nowiki>
addDropdownMenu("DisambigM","消歧義方式",[
	{
		id         : "article",
		text       : "消歧義條目",
		tagOpen    : "'''{\{subst:PAGENAME}\}'''可以指:\n" ,
		sampleText : "* [[歧義條目1]],描述1。\n* [[歧義條目2]],描述2。" ,
		tagClose   : "\n{\{disambig|cat=N字消歧義}\}"
	},
	{
		id         : "mainsingle",
		text       : "主副消歧義",
		tagOpen    : "{\{Otheruses|subject=",
		sampleText : "本條目主題|重定向條目名稱|other=重定向條目主題",
		tagClose   : "}\}"
	},
	{
		id         : "mainmultiple",
		text       : "主副(多個)",
		tagOpen    : "{\{Otheruseslist|",
		sampleText : "本條目主題|重定向條目名稱1|重定向條目主題1|重定向條目名稱2|重定向條目主題2",
		tagClose   : "}\}"
	},
]);
 
addDropdownMenu("articleEdit","條目編輯",[
	{ 
		id         : "seealso",
		text       : "參見章節",
		tagOpen    : "\n== 相關條目 ==\n* [[" ,
		sampleText : "相關條目名稱" ,
		tagClose   : "]]\n"
	},
	{ 
		id         : "ref",
		text       : "參考資料章節",
		tagOpen    : '\n== 參考文獻 ==\n',
		sampleText : '{{reflist}}',
		tagClose   : '\n',
	},
	{
		id         : "elink",
		text       : "外部連結章節",
		tagOpen    : "\n== 外部連結 ==\n* [" ,
		sampleText : "地址 顯示名稱" ,
		tagClose   : "]\n"
	},
	{ 
		id         : "image",
		text       : "地區語言圖像",
		tagOpen    : "{\{Image\n" ,
		sampleText : "\t|zh=無轉換圖像名\n\t|zh-hans=简体图像名\n\t|zh-hant= 繁体圖像名\n\t|zh-cn=大陆图像名\n\t|zh-tw=臺灣圖像名\n\t|zh-hk=香港圖像名\n\t|zh=马新图像名\n\t|图像属性\n" ,
		tagClose   : "}\}"
	},
	{ 
		id         : "Current",
		text       : "正在發生",
		tagOpen    : "{\{Current}\}",
		sampleText : "",
		tagClose   : ""
	},
	{ 
		id         : "noconv",
		text       : "取消繁簡轉換",
		tagOpen    : "-\{" ,
		sampleText : "不轉換內容",
		tagClose   : "}\-"
	},
	{ 
		id         : "title",
		text       : "標題錯誤",
		tagOpen    : "-\{T|",
		sampleText : "正确标题名称",
		tagClose   : "}\-"
	},
	{ 
		id         : "noteTA",
		text       : "標題全文轉換",
		tagOpen    : '{\{noteTA\n',
		sampleText : '|G1=公共组名\n|1=zh-cn:大陆;zh-tw:台灣;zh-hk:香港;zh-sg:新马;\n|2=zh-cn:大陆;zh-tw:台灣;zh-hk:香港;zh-sg:新马;\n',
		tagClose   : "}\}"
	}
]);
/*
addEditButton('btnRedirect',{
	src        : "c/c8/Button_redirect.png",
	tagOpen    : "#REDIRECT [[",
	sampleText : "目標條目名",
	tagClose   : "]]",
	speedTip   : "重定向"
});
 
var __temp="\nFile:PictureFileName.jpg|"+"圖片題注";
addEditButton('btnGallery',{
	src        : "9/9e/Btn_toolbar_gallery.png",
	tagOpen    : "<gallery>",
	sampleText : __temp+__temp,
	tagClose   : "\n</gallery>",
	speedTip   : "畫廊"
});
delete __temp;
 
addEditButton('btnNowiki',{
	src        : '8/82/Nowiki_icon.png',
	tagOpen    : '<nowiki>',
	sampleText : '插入非格式文本',
	tagClose   : '</nowiki>',
	speedTip   : "非維基格式文字"
});

addEditButton('btnSigOnly',{
	src        : 'd/d8/Button_sig_zh.png',
	tagOpen    : '~~\~',
	sampleText : '',
	tagClose   : '',
	speedTip   : "簽名(無日期)",
	width      : 12
});

addEditButton('btnSignature',{
	src        : '6/6d/Button_sig.png',
	tagOpen    : '—~~\~~',
	sampleText : '',
	tagClose   : '',
	speedTip   : "簽名"
});
*/
addEditButton('btnTime',{
	src        : '3/3f/Button_attendre.png',
	tagOpen    : '~~\~~\~',
	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   : "粗體"
});
 
addEditButton('btnItalic',{
	src        : 'd/d7/Italic_icon.png',
	tagOpen    : '\'\'',
	sampleText : '斜體',
	tagClose   : '\'\'',
	speedTip   : "斜體"
});
 
addEditButton('btnUnderline',{
	src        : 'f/fd/Button_underline.png',
	tagOpen    : '<u>',
	sampleText : '底線',
	tagClose   : '</u>',
	speedTip   : "底線"
});
 
addEditButton('btnStrike',{
	src        : "c/c9/Button_strike.png",
	tagOpen    : "<del>",
	sampleText : '刪除線',
	tagClose   : "</del>",
	speedTip   : "刪除線"
});
 
addEditButton('btnSup',{
	src        : "6/6a/Button_sup_letter.png",
	tagOpen    : "<sup>",
	sampleText : "上標",
	tagClose   : "</sup>",
	speedTip   : "上標"
});
 
addEditButton('btnSub',{
	src        : "a/aa/Button_sub_letter.png",
	tagOpen    : "<sub>",
	sampleText : "下標",
	tagClose   : "</sub>",
	speedTip   : "下標"
});
 
addEditButton('btnBig',{
	src        : "5/56/Button_big.png",
	tagOpen    : '<span style="font-size:larger;">',
	sampleText : "放大",
	tagClose   : "</span>",
	speedTip   : "放大"
});
 
addEditButton('btnSmall',{
	src        : "5/58/Button_small.png",
	tagOpen    : '<span style="font-size:smaller;">',
	sampleText : "縮小",
	tagClose   : "</span>",
	speedTip   : "縮小"
});
*/
addEditButton('btnColor',{
	src        : "1/1e/Button_font_color.png",
	tagOpen    : "{{Color|ColorName|",
	sampleText : "文字",
	tagClose   : "}}",
	speedTip   : "顏色文字"
});
 
addEditButton('btnQuote',{
	src        : "f/fd/Button_blockquote.png",
	tagOpen    : '{\{quote|\n',
	sampleText : "引文",
	tagClose   : "\n}\}",
	speedTip   : "塊引用"
});
/*
addEditButton('btnCode',{
	src        : "2/23/Button_code.png",
	tagOpen    : "<code>",
	sampleText : "程式碼",
	tagClose   : "</code>",
	speedTip   : "程式碼文字"
});
 
addEditButton('btnComment',{
	src        : "3/34/Button_hide_comment.png",
	tagOpen    : "<!-- ",
	sampleText : "隱藏文字",
	tagClose   : " -->",
	speedTip   : "注釋或隱藏文字"
});
 
addEditButton('btnTable',{
	src        : "0/04/Button_array.png",
	tagOpen    : '\n{| class="wikitable" \n|- \n| 第一部分 || 第二部分 \n|- \n| 第三部分 || 第四部分',
	sampleText : "",
	tagClose   : "\n|}\n",
	speedTip   : "插入表格"
});
*/
addDropdownMenu("ColTags","分隔數欄",[
	{ 
		id         : "colBegin",
		text       : "開始",
		tagOpen    : "{\{col-begin}\}",
		tagClose   : "\n"
	},
	{ 
		id         : "colEnd",
		text       : "完結",
		tagOpen    : "{\{col-end}\}",
		tagClose   : "\n"
	},
	{ 
		id         : "colTwo",
		text       : "分兩欄",
		tagOpen    : "{\{col-2}\}",
		tagClose   : "\n"
	},
	{ 
		id         : "colThree",
		text       : "分三欄",
		tagOpen    : "{\{col-3}\}",
		tagClose   : "\n"
	},
	{ 
		id         : "colFour",
		text       : "分四欄",
		tagOpen    : "{\{col-4}\}",
		tagClose   : "\n"
	},
	{ 
		id         : "colFive",
		text       : "分五欄",
		tagOpen    : "{\{col-5}\}",
		tagClose   : "\n"
	},
	{ 
		id         : "colSix",
		text       : "分為六欄",
		tagOpen    : "{\{col-6}\}",
		tagClose   : "\n"
	}
]);
 
addDropdownMenu("navboxSep","導航分隔",[
	{
		id         : "dash",
		text       : "-",
		tagOpen    : "{\{" ,
		sampleText : "-w" ,
		tagClose   : "}\}"
	},
	{
		id         : "dash2",
		text       : "—",
		tagOpen    : "{\{" ,
		sampleText : "—w" ,
		tagClose   : "}\}"
	},
	{ 
		id         : "dot",
		text       : "·",
		tagOpen    : "{\{" ,
		sampleText : "·w" ,
		tagClose   : "}\}"
	},
	{
		id         : "slash",
		text       : "/",
		tagOpen    : "{\{" ,
		sampleText : "\\w" ,
		tagClose   : "}\}"
	},
	{ 
		id         : "pipe",
		text       : "|",
		tagOpen    : "{\{" ,
		sampleText : "!w" ,
		tagClose   : "}\}"
	}
]);
 
addEditButton('btnDefaultSort',{
	src        : "9/9f/Button_defaultsort.png",
	tagOpen    : '{\{DEFAULTSORT:',
	sampleText : '索引',
	tagClose   : '}\}\n',
	speedTip   : "插入索引"
});
 
addEditButton('btnCommonsCat',{
	src        : "f/f8/Button_Tool_commons.png",
	tagOpen    : '{\{Commonscat|',
	sampleText : 'Commons分類',
	tagClose   : '}\}\n',
	speedTip   : "加入Commons分類連結"
});
 
addEditButton('btnNowCommons',{
	src        : "b/b7/Button_nowcommons.png",
	tagOpen    : '{\{Nowcommons|',
	sampleText : 'Commons檔案名稱',
	tagClose   : '}\}\n',
	speedTip   : "已上載到Commons的檔案"
});
 
addEditButton('btnJapanese',{
	src        : "4/42/Buttonsablona.png",
	tagOpen    : '{\{Japanese|',
	sampleText : 'japanese=*|kana=|romaji=*|舊寫=|',
	tagClose   : '}\}\n',
	speedTip   : "日語名稱標示模板"
});
/*
addDropdownMenu("longRomaji","日文長音",[
	{ 
		id         : "LLA",
		text       : "Aa",
		sampleText : "Ā"
	},
	{ 
		id         : "LLU",
		text       : "Uu",
		sampleText : "Ū"
	},
	{ 
		id         : "LLE",
		text       : "Ee",
		sampleText : "Ē"
	},
	{ 
		id         : "LLO",
		text       : "Oo",
		sampleText : "Ō"
	},
	{ 
		id         : "LSA",
		text       : "aa",
		sampleText : "ā"
	},
	{ 
		id         : "LSU",
		text       : "uu",
		sampleText : "ū"
	},
	{ 
		id         : "LSE",
		text       : "ee",
		sampleText : "ē"
	},
	{ 
		id         : "LSO",
		text       : "oo",
		sampleText : "ō"
	}
]);
*/
addDropdownMenu("langTags","非中文字",[
	{ 
		id         : "en",
		text       : "英語",
		tagOpen    : "{\{lang|en|",
		sampleText : "英語",
		tagClose   : "}\}"
	},
	{ 
		id         : "de",
		text       : "德語",
		tagOpen    : "{\{lang|de|",
		sampleText : "德語",
		tagClose   : "}\}"
	},
	{                
		id         : "fr",
		text       : "法語",
		tagOpen    : "{\{lang|fr|",
		sampleText : "法語",
		tagClose   : "}\}"
	},
	{ 
		id         : "ja",
		text       : "日語",
		tagOpen    : "{\{lang|ja|",
		sampleText : "日語",
		tagClose   : "}\}"
	},
	{ 
		id         : "ru",
		text       : "俄語",
		tagOpen    : "{\{lang|ru|",
		sampleText : "俄語",
		tagClose   : "}\}"
	},
	{ 
		id         : "langcode",
		text       : "其他語言",
		tagOpen    : "{\{lang|"+"在此填上語言代碼|",
		sampleText : "其他語言",
		tagClose   : "}\}"
	}
]);
 
addDropdownMenu("linkTag","連結語言",[
	{ 
		id         : "englink",
		text       : "英語",
		tagOpen    : "{\{",
		sampleText : "en",
		tagClose   : "}\}"
	},
	{ 
		id         : "japlink",
		text       : "日語",
		tagOpen    : "{\{",
		sampleText : "ja",
		tagClose   : "}\}"
	},
	{ 
		id         : "simchilink",
		text       : "簡體中文",
		tagOpen    : "{\{",
		sampleText : "zh-hans",
		tagClose   : "}\}"
	},
	{ 
		id         : "trachilink",
		text       : "繁體中文",
		tagOpen    : "{\{",
		sampleText : "zh-hant",
		tagClose   : "}\}"
	},
	{ 
		id         : "otherlanglink",
		text       : "其他語言",
		tagOpen    : "{\{",
		sampleText : "在此填上語言代碼",
		tagClose   : "}\}"
	}
]);
// </nowiki>