User:Frankou/Friendly/friendlytag.js

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

// <nowiki>
// If FriendlyConfig aint exist.
if( typeof( FriendlyConfig ) == 'undefined' ) {
	FriendlyConfig = {};
}
 
/**
 FriendlyConfig.summaryAd ( string )
 If ad should be added or not to summary, default [[WP:FRIENDLY|Friendly]]
 */
if( typeof( FriendlyConfig.summaryAd ) == 'undefined' ) {
	FriendlyConfig.summaryAd = " using [[WP:FRIENDLY|Friendly]]";
}
 
/**
 FriendlyConfig.groupByDefault ( boolean )
 */
if( typeof( FriendlyConfig.groupByDefault ) == 'undefined' ) {
	FriendlyConfig.groupByDefault = false;
}
 
/**
 FriendlyConfig.watchTaggedPages ( boolean )
 */
if( typeof( FriendlyConfig.watchTaggedPages ) == 'undefined' ) {
	FriendlyConfig.watchTaggedPages = false;
}
 
/**
 FriendlyConfig.markTaggedPagesAsMinor ( boolean )
 */
if( typeof( FriendlyConfig.markTaggedPagesAsMinor ) == 'undefined' ) {
	FriendlyConfig.markTaggedPagesAsMinor = true;
}
 
/**
 FriendlyConfig.markTaggedPagesAsPatrolled ( boolean )
 */
if( typeof( FriendlyConfig.markTaggedPagesAsPatrolled ) == 'undefined' ) {
	FriendlyConfig.markTaggedPagesAsPatrolled = true;
}
 
var isRedirect = false;
 
function friendlytag() {
	if( QueryString.exists( 'redirect' ) && QueryString.get( 'redirect' ) == 'no' && !QueryString.exists( 'rcid' ) ) {
		isRedirect = true;
		mw.util.addPortletLink( 'p-cactions', "javascript:friendlytag.callback()", "tag", "friendly-tag", "Tag redirect", "");
	} else if( wgNamespaceNumber != 0 || wgCurRevisionId == false ) {
		return;
	} else {
		mw.util.addPortletLink( 'p-cactions', "javascript:friendlytag.callback()", "tag", "friendly-tag", "Tag article", "");
	}
}
 
$(friendlytag);
 
friendlytag.callback = function friendlytagCallback( uid ) {
	var Window = new SimpleWindow( 600, 400 );
	var form = new QuickForm( friendlytag.callback.evaluate );
 
	if( !isRedirect ) {
		Window.setTitle( "Article maintenance tagging" );
 
		form.append( {
				type: 'checkbox',
				list: [
					{
						label: 'Group into {{article issues}} if possible',
						value: 'group',
						name: 'group',
						tooltip: 'If applying three or more templates supported by {{article issues}} and this box is checked, all supported templates will be grouped into a single {{article issues}} template.',
						checked: FriendlyConfig.groupByDefault
					}
				]
			}
		);
 
		form.append( { type:'submit' } );
 
		form.append( { type:'header', label:'Maintenance templates' } );
		form.append( { type:'checkbox', name: 'maintenance', list: friendlytag.maintenanceList } );
 
		form.append( { type:'header', label:'Problem templates' } );
		form.append( { type:'checkbox', name: 'problem', list: friendlytag.problemList } );
 
		form.append( { type:'header', label:'Notice templates' } );
		form.append( { type:'checkbox', name: 'notice', list: friendlytag.noticeList } );
 
		if( typeof( FriendlyConfig.customTagList ) == 'object' ) {
			form.append( { type:'header', label:'Custom templates' } );
			form.append( { type: 'checkbox', name: 'custom', list: FriendlyConfig.customTagList } );
		}
	} else {
		Window.setTitle( "Redirect tagging" );
 
		form.append( { type:'submit' } );
 
		form.append( { type:'header', label:'Spelling, misspelling, tense and capitalization templates' } );
		form.append( { type:'checkbox', name: 'spelling', list: friendlytag.spellingList } );
 
		form.append( { type:'header', label:'Alternative name templates' } );
		form.append( { type:'checkbox', name: 'alternative', list: friendlytag.alternativeList } );
 
		form.append( { type:'header', label:'Miscellaneous and administrative redirect templates' } );
		form.append( { type:'checkbox', name: 'administrative', list: friendlytag.administrativeList } );
	}
 
	form.append( { type:'submit' } );
 
	var result = form.render();
	Window.setContent( result );
	Window.display();
}
 
friendlytag.maintenanceList = [
	//{
	//	label: '\{\{catimprove\}\}: article may require additional categories.',
	//	value: 'catimprove'
	//},
	{
		label: '\{\{cleanup\}\}: 條目可能需要進行清理',
		value: 'cleanup'
	},
	//{
	//	label: '\{\{confusing\}\}: article may be confusing or unclear',
	//	value: 'confusing'
	//},
	{
		label: '\{\{copyedit\}\}: 條目需要校對,以確保語法、用語、語氣、風格、表達恰當',
		value: 'copyedit'
	},
	//{
	//	label: '\{\{deadend\}\}: article has few or no links to other articles',
	//	value: 'deadend'
	//},
	//{
	//	label: '\{\{do-attempt\}\}: few or no other articles link to this one even after attempted de-orphaning',
	//	value: 'do-attempt'
	//},
	//{
	//	label: '\{\{essay-like\}\}: article is written like an essay and needs cleanup',
	//	value: 'essay-like'
	//},
	{
		label: '\{\{expand\}\}: 此條目需要擴充',
		value: 'expand' 
	},
	{
		label: '\{\{expert\}\}: 此條目需要精通或熟悉本主題的專家參與編輯',
		value: 'expert'
	},
	{
		label: '\{\{fansite\}\}: 此條目類似愛好者站點',
		value: 'fansite'
	},
	{
		label: '\{\{in-universe\}\}: 本條目以小說作品原始的寫作風格敘述一個小說作品或情節',
		value: 'in-universe'
	},
	//{
	//	label: '\{\{internallinks\}\}: article needs more relevant internal links',
	//	value: 'internallinks'
	//},
	{
		label: '\{\{intro-missing\}\}: 這個條目的導言過於短小',
		value: 'intromissing'
	},
	//{
	//	label: '\{\{intro-toolong\}\}: article introduction is too long and should be shortened',
	//	value: 'intro length'
	//},
	//{
	//	label: '\{\{intro-tooshort\}\}: article introduction is too short and should be expanded',
	//	value: 'tooshort'
	//},
	//{
	//	label: '\{\{intro-rewrite\}\}: lead section of article needs to be rewritten to comply with guidelines',
	//	value: 'introrewrite'
	//},
	//{
	//	label: '\{\{morefootnotes\}\}: article has some references, but insufficient in-text citations',
	//	value: 'morefootnotes'
	//},
	{
		label: '\{\{nofootnotes\}\}: 本條目包含了一些參考來源或外部鏈接,但由於條目內部缺少內文腳註,本條目的來源仍然不明確',
		value: 'nofootnotes'
	},
	{
		label: '\{\{notchinese\}\}: 此條目包含過多不是現代標準漢語的內容',
		value: 'notchinese'
	},
	{
		label: '\{\{orphan\}\}: 這個條目沒有或只有很少鏈入頁面',
		value: 'orphan' 
	},
	//{
	//	label: '\{\{plot\}\}: plot summary in article is too long',
	//	value: 'plot' 
	//},
	//{
	//	label: '\{\{prose\}\}: article is in a list format that may be better presented using prose',
	//	value: 'prose'
	//},
	//{
	//	label: '\{\{pov-check\}\}: nominate article to be checked for neutrality',
	//	value: 'pov-check'
	//},
	//{
	//	label: '\{\{sections\}\}: article needs to be broken into sections',
	//	value: 'sections'
	//},
	{
		label: '\{\{substub\}\}: 這篇過於短小的文章',
		value: 'substub'
	},
	{
		label: '\{\{tone\}\}: 此條目的語調或風格可能不適合百科全書的寫作方式',
		value: 'tone'
	},
	{
		label: '\{\{uncategorized\}\}: 此條目缺少頁面分類',
		value: 'uncategorized'
	},
	{
		label: '\{\{verylong\}\}: 此條目可能過於冗長',
		value: 'verylong'
	},
	{
		label: '\{\{wikify\}\}: 此條目需要被修正為維基格式以符合質量標準',
		value: 'wikify'
	}
];
 
 
friendlytag.problemList = [
	{
		label: '\{\{advert\}\}: 此條目類似廣告',
		value: 'advert'
	},
	//{
	//	label: '\{\{autobiography\}\}: article is an autobiography and may not be of NPOV',
	//	value: 'autobiography'
	//},
	//{
	//	label: '\{\{close paraphrase\}\}: article contains close paraphrasing of a non-free copyrighted source',
	//	value: 'close paraphrase'
	//},
	//{
	//	label: '\{\{coi\}\}: article creator or major contributor may have a conflict of interest',
	//	value: 'coi'
	//},
	//{
	//	label: '\{\{context\}\}: article provides insufficient context',
	//	value: 'context'
	//},
	//{
	//	label: '\{\{copypaste\}\}: article appears to have been copied and pasted from a source',
	//	value: 'copypaste'
	//},
	{
		label: '\{\{disputed\}\}: 此條目的準確性有爭議',
		value: 'disputed'
	},
	//{
	//	label: '\{\{external links\}\}: article\'s external links may not follow content policies or guidelines',
	//	value: 'external links'
	//},
	{
		label: '\{\{globalize\}\}: 此條目僅具一部分地域的觀點或資料,尚需補充世界性的內容',
		value: 'globalize',
		//subgroup: {
		//	name: 'globalize',
		//	type: 'select',
		//	list: [
		//		{
		//			label: "\{\{globalize\}\}: article may not represent a worldwide view of the subject",
		//			value: "globalize"
		//		},
		//		{
		//			label: "Region-specific \{\{globalize\}\} subtemplates",
		//			list: [
		//				{
		//					label: "\{\{globalize/Australia\}\}: article deals primarily with the Australian viewpoint",
		//					value: "globalize/Australia"
		//				},
		//				{
		//					label: "\{\{globalize/Belgium\}\}: article deals primarily with the Belgian viewpoint",
		//					value: "globalize/Belgium"
		//				},
		//				{
		//					label: "\{\{globalize/Canada\}\}: article deals primarily with the Canadian viewpoint",
		//					value: "globalize/Canada"
		//				},
		//				{
		//					label: "\{\{globalize/Common law\}\}: article deals primarily with the viewpoint of common law countries",
		//					value: "globalize/Common law"
		//				},
		//				{
		//					label: "\{\{globalize/Eng\}\}: article deals primarily with the English-speaking viewpoint",
		//					value: "globalize/Eng"
		//				},
		//				{
		//					label: "\{\{globalize/Europe\}\}: article deals primarily with the European viewpoint",
		//					value: "globalize/Europe"
		//				},
		//				{
		//					label: "\{\{globalize/France\}\}: article deals primarily with the French viewpoint",
		//					value: "globalize/France"
		//				},
		//				{
		//					label: "\{\{globalize/Germany\}\}: article deals primarily with the German viewpoint",
		//					value: "globalize/Germany"
		//				},
		//				{
		//					label: "\{\{globalize/Greece\}\}: article deals primarily with the Greek viewpoint",
		//					value: "globalize/Greece"
		//				},
		//				{
		//					label: "\{\{globalize/Luxembourg\}\}: article deals primarily with the Luxembourgish viewpoint",
		//					value: "globalize/Luxembourg"
		//				},
		//				{
		//					label: "\{\{globalize/Netherlands\}\}: article deals primarily with the Dutch viewpoint",
		//					value: "globalize/Netherlands"
		//				},
		//				{
		//					label: "\{\{globalize/North America\}\}: article deals primarily with the North American viewpoint",
		//					value: "globalize/North America"
		//				},
		//				{
		//					label: "\{\{globalize/Northern\}\}: article deals primarily with the northern hemisphere viewpoint",
		//					value: "globalize/Northern"
		//				},
		//				{
		//					label: "\{\{globalize/Russia\}\}: article deals primarily with the Russian viewpoint",
		//					value: "globalize/Russia"
		//				},
		//				{
		//					label: "\{\{globalize/Southern\}\}: article deals primarily with the southern hemisphere viewpoint",
		//					value: "globalize/Southern"
		//				},
		//				{
		//					label: "\{\{globalize/UK\}\}: article deals primarily with the British viewpoint",
		//					value: "globalize/UK"
		//				},
		//				{
		//					label: "\{\{globalize/UK and Canada\}\}: article deals primarily with the British and Canadian viewpoints",
		//					value: "globalize/UK and Canada"
		//				},
		//				{
		//					label: "\{\{globalize/USA\}\}: article deals primarily with the American viewpoint",
		//					value: "globalize/USA"
		//				}
		//			]
		//		}
		//	]
		//}
	},
	//{
	//	label: '\{\{overcoverage\}\}: Examples and perspectives in the article might have an extensive bias or disproportional coverage towards one or more specific regions',
	//	value: 'overcoverage'
	//},
	{
		label: '\{\{hoax\}\}: 此條目的真實性被質疑',
		value: 'hoax'
	},
	{
		label: '\{\{non-free\}\}: 此條目可能過多或不當地使用了受版權保護的文字、圖像或/及多媒體文件',
		value: 'non-free'
	},
	{
		label: '\{\{notability\}\}: 此條目主題未突顯其知名度或顯著性',
		value: 'notability',
		subgroup: {
			name: 'notability',
			type: 'select',
			list: [
				{
					label: "\{\{notability\}\}: 通用的知名度標準",
					value: "none"
				},
				//{
				//	label: "\{\{notability|Academics\}\}: notability guideline for academics",
				//	value: "Academics"
				//},
				{
					label: "\{\{notability|Biographies\}\}: 人物傳記",
					value: "Biographies"
				},
				//{
				//	label: "\{\{notability|Books\}\}: notability guideline for books",
				//	value: "Books"
				//},
				//{
				//	label: "\{\{notability|Companies\}\}: notability guideline for companies and organizations",
				//	value: "Companies"
				//},
				//{
				//	label: "\{\{notability|Episode\}\}: notability guideline for television episodes",
				//	value: "Episode"
				//},
				{
					label: "\{\{notability|Fiction\}\}: 虛構事物",
					value: "Fiction"
				},
				//{
				//	label: "\{\{notability|Films\}\}: notability guideline for films",
				//	value: "Films"
				//},
				//{
				//	label: "\{\{notability|Institutions\}\}: synonym of \"Companies\"",
				//	value: "Institutions"
				//},
				//{
				//	label: "\{\{notability|Music\}\}: notability guideline for music",
				//	value: "Music"
				//},
				{
					label: "\{\{notability|Neologisms\}\}: 發明、研究",
					value: "Neologisms"
				},
				//{
				//	label: "\{\{notability|Numbers\}\}: notability guideline for numbers",
				//	value: "Numbers"
				//},
				//{
				//	label: "\{\{notability|Organizations\}\}: synonym of \"Companies\"",
				//	value: "Organizations"
				//},
				//{
				//	label: "\{\{notability|Products\}\}: notability guideline for products and services",
				//	value: "Products"
				//},
				{
					label: "\{\{notability|Web\}\}: 網站、網絡內容",
					value: "Web"
				}
			]
		}
	},
	{
		label: '\{\{npov\}\}: 此條目的中立性有爭議。內容、語調可能帶有明顯的個人觀點或地方色彩',
		value: 'npov'
	},
	{
		label: '\{\{original research\}\}: 此條目可能包含原創研究或未查證內容',
		value: 'original research'
	},
	//{
	//	label: '\{\{peacock\}\}: article may contain peacock terms that promotes the subject in a subjective manner without adding information',
	//	value: 'peacock'
	//},
	{
		label: '\{\{primarysources\}\}: 此條目需要可靠、公開、第三方的來源',
		value: 'primarysources'
	},
	//{
	//	label: "\{\{recentism\}\}: article is slanted towards recent events",
	//	value: "recentism"
	//},
	{ 
		label: '\{\{refimprove\}\}: 此條目需要補充更多來源',
		value: 'refimprove' 
	},
	//{ 
	//	label: '\{\{refimproveBLP\}\}: BLP article needs additional references or sources for verification',
	//	value: 'refimproveBLP' 
	//},
	//{
	//	label: '\{\{self-published\}\}: article may contain improper references to self-published sources',
	//	value: 'self-published'
	//},
	//{
	//	label: '\{\{synthesis\}\}: article may contain unpublished synthesis of published material that conveys unattributable ideas',
	//	value: 'synthesis'
	//},
	//{
	//	label: "\{\{toofewopinions\}\}: article may not include all significant viewpoints",
	//	value: "toofewopinions"
	//},
	{
		label: '\{\{unencyclopedic\}\}: 此條目可能不適合寫入百科全書',
		value: 'unencyclopedic'
	},
	{
		label: '\{\{unreferenced\}\}: 此條目沒有列出任何參考或來源',
		value: 'unreferenced'
	},
	//{
	//	label: '\{\{unreferencedBLP\}\}: BLP article has no references at all',
	//	value: 'unreferencedBLP'
	//},
	{
		label: '\{\{update\}\}: 這個條目需要更新',
		value: 'update'
	},
	{
		label: '\{\{weasel\}\}: 此條目可能因為語意模棱兩可而損及其中立性',
		value: 'weasel'
	}
];
 
friendlytag.noticeList = [
	{
		label: '\{\{current\}\}: 本文記述一項新聞動態',
		value: 'current',
		subgroup: {
			name: 'current',
			type: 'select',
			list: [
				{
					label: "\{\{current\}\}: 本文記述一項新聞動態",
					value: "current"
				},
				//{
				//	label: "\{\{bridge under construction\}\}: article contains information about a bridge currently under construction",
				//	value: "bridge under construction"
				//},
				//{
				//	label: "\{\{building under construction\}\}: article contains information about a building currently under construction",
				//	value: "building under construction"
				//},
				//{
				//	label: "\{\{current antics\}\}: person is currently participating in a reality television show",
				//	value: "current antics"
				//},
				//{
				//	label: "\{\{current bill\}\}: article documents proposed legislation that is currently being considered",
				//	value: "current bill"
				//},
				//{
				//	label: "\{\{current court case\}\}: article documents a current court case",
				//	value: "current court case"
				//},
				//{
				//	label: "\{\{current fiction\}\}: article is about a recently released work of fiction",
				//	value: "current fiction"
				//},
				//{
				//	label: "\{\{current game\}\}: article documents a current event in video gaming",
				//	value: "current game"
				//},
				//{
				//	label: "\{\{current person\}\}: article is about a person involved in a current event",
				//	value: "current person"
				//},
				//{
				//	label: "\{\{current product\}\}: article documents a recently released product",
				//	value: "current product"
				//},
				//{
				//	label: "\{\{current pw\}\}: article documents a current professional wrestling event",
				//	value: "current pw"
				//},
				{
					label: "\{\{current spaceflight\}\}: 本文或本章節是關於目前或最近的太空任務",
					value: "current spaceflight"
				},
				{
					label: "\{\{current sport\}\}: 此條目記述一項近期體育賽事",
					value: "current sport"
				},
				//{
				//	label: "\{\{current sport delay\}\}: article documents a current sports-related event which may contain information not aired because of tape delay",
				//	value: "current sport delay"
				//},
				{
					label: "\{\{current related\}\}: 本條目和一項新聞動態相關",
					value: "current related"
				},
				//{
				//	label: "\{\{current single\}\}: article documents a current single",
				//	value: "current single"
				//},
				//{
				//	label: "\{\{current territorial changes\}\}: article is subject to current territorial changes and may not represent up-to-date detail",
				//	value: "current territorial changes"
				//},
				//{
				//	label: "\{\{in space\}\}: article documents a person who is currently in space",
				//	value: "in space"
				//},
				//{
				//	label: "\{\{inland waterway under restoration\}\}: article contains information about an inland waterway currently under restoration",
				//	value: "inland waterway under restoration"
				//},
				//{
				//	label: "\{\{ongoing lawsuit\}\}: article documents an ongoing lawsuit",
				//	value: "ongoing lawsuit"
				//},
				//{
				//	label: "\{\{ongoing election\}\}: article contains information about an ongoing election",
				//	value: "ongoing election"
				//},
				//{
				//	label: "\{\{ongoing weather\}\}: article contains information about an ongoing meteorological event or phenomenon",
				//	value: "ongoing weather"
				//},
				{
					label: "\{\{recent death\}\}: 這是一篇關於最近逝世人物的文章",
					value: "recent death"
				}
				//{
				//	label: "\{\{recently convicted\}\}: article is about a person who has recently been convicted in a criminal case",
				//	value: "recently convicted"
				//},
				//{
				//	label: "\{\{road under construction\}\}: article contains information about a road currently under construction",
				//	value: "road under construction"
				//}
			]
		}
	},
	{
		label: '\{\{future\}\}: 此條目是關於未來已定或預期會發生的事件',
		value: 'future',
		subgroup: {
			name: 'future',
			type: 'select',
			list:  [
				{
					label: "\{\{future\}\}: 此條目是關於未來已定或預期會發生的事件",
					value: "future"
				},
				//{
				//	label: "Education",
				//	list: [
				//		{
				//			label: "\{\{future book\}\}: scheduled, forthcoming or expected future book(s)",
				//			value: "future book"
				//		},
				//		{
				//			label: "\{\{future museum\}\}: planned museum",
				//			value: "future museum"
				//		}
				//	]
				//},
				{
					label: "Engineering",
					list: [
						//{
						//	label: "\{\{future building\}\}: expected future buildings or structures",
						//	value: "future building"
						//},
						//{
						//	label: "\{\{future chip\}\}: scheduled or expected future computer chips",
						//	value: "future chip"
						//},
						//{
						//	label: "\{\{future energy infrastructure\}\}: planned or expected future energy production, transmission, distribution or other energy related infrastructure",
						//	value: "future energy infrastructure"
						//},
						{
							label: "\{\{future infrastructure\}\}: 此條目是關於未來的建設或計劃",
							value: "future infrastructure"
						},
						//{
						//	label: "\{\{future mine\}\}: planned or proposed future mine",
						//	value: "future mine"
						//},
						//{
						//	label: "\{\{future pipeline\}\}: planned or expected pipeline",
						//	value: "future pipeline"
						//},
						//{
						//	label: "\{\{future power plant\}\}: planned or expected power plant",
						//	value: "future power plant"
						//},
						//{
						//	label: "\{\{future scientific facility\}\}: expected future scientific facility",
						//	value: "future scientific facility"
						//},
						{
							label: "\{\{future software\}\}: 此條目包含計劃或者期待發佈的未來軟件",
							value: "future software"
						},
						{
							label: "\{\{future spaceflight\}\}: 本條目為已列入計劃或可能進行的航天活動",
							value: "future spaceflight"
						}
						//{
						//	label: "\{\{launching\}\}: rocket or spacecraft which is either currently in the process of launching, or is scheduled to launch within the next few days",
						//	value: "launching"
						//},
						//{
						//	label: "\{\{future web service\}\}: scheduled or expected Web service",
						//	value: "future web service"
						//}
					]
				},
				{
					label: "Entertainment",
					list: [
						//{
						//	label: "\{\{future album\}\}: scheduled or expected album",
						//	value: "future album"
						//},
						//{
						//	label: "\{\{future amusement ride\}\}: planned or expected future amusement ride",
						//	value: "future amusement ride"
						//},
						//{
						//	label: "\{\{future channel\}\}: future television station, channel or network",
						//	value: "future channel"
						//},
						//{
						//	label: "\{\{future comic\}\}: scheduled or expected comic book release, or a series already in progress",
						//	value: "future comic"
						//},
						{
							label: "\{\{future film\}\}: 此條目是關於正在計劃或拍攝中的電影",
							value: "future film"
						},
						{
							label: "\{\{future game\}\}: 此條目是關於尚未發行的電子遊戲",
							value: "future game"
						},
						//{
						//	label: "\{\{future play article\}\}: upcoming play or musical",
						//	value: "future play article"
						//},
						//{
						//	label: "\{\{future radio\}\}: future radio station, radio network or radio show",
						//	value: "future radio"
						//},
						//{
						//	label: "\{\{future single\}\}: scheduled or expected future single",
						//	value: "future single"
						//},
						{
							label: "\{\{future tvshow\}\}: 此條目包含有關正在計劃、拍攝中或有待播出的電視節目的信息",
							value: "future tvshow"
						},
						{
							label: "\{\{future tvshow information\}\}: 此條目包含有關正在播出的電視系列節目的信息",
							value: "future tvshow information"
						}
						//{
						//	label: "\{\{future television episode\}\}: scheduled upcoming television episode of an already-running TV series",
						//	value: "future television episode"
						//},
						//{
						//	label: "\{\{future television series\}\}: scheduled upcoming television series",
						//	value: "future television series"
						//}
					]
				},
				{
					label: "Miscellaneous",
					list: [
						//{
						//	label: "\{\{concept product\}\}: contains information about conceptual products",
						//	value: "concept product"
						//},
						{
							label: "\{\{future election\}\}: 此條目是關於將舉辦或進行中的選舉",
							value: "future election"
						},
						//{
						//	label: "\{\{future election in the United States\}\}: upcoming or ongoing election in the United States",
						//	value: "future election in the United States"
						//},
						{
							label: "\{\{future product\}\}: 此條目是關於未上市產品的信息",
							value: "future product"
						}
						//{
						//	label: "\{\{future product small\}\}: (small) future product, and may contain unverified, unreliable, or incorrect information",
						//	value: "future product small"
						//}
					]
				},
				{
					label: "Transportation",
					list: [
						//{
						//	label: "\{\{future aircraft\}\}: scheduled or anticipated future aircraft",
						//	value: "future aircraft"
						//},
						//{
						//	label: "\{\{future airline\}\}: planned or expected new airline",
						//	value: "future airline"
						//},
						//{
						//	label: "\{\{future airport\}\}: planned or expected new airport",
						//	value: "future airport"
						//},
						//{
						//	label: "\{\{future airport authority\}\}: planned or expected new airport authority",
						//	value: "future airport authority"
						//},
						//{
						//	label: "\{\{future airport expansion\}\}: planned or expected expansion of an existing airport",
						//	value: "future airport expansion"
						//},
						//{
						//	label: "\{\{future Australian public transportation\}\}: planned or expected public transportation infrastructure in Australia",
						//	value: "future Australian public transportation"
						//},
						//{
						//	label: "\{\{future automobile\}\}: scheduled or anticipated future automobile",
						//	value: "future automobile"
						//},
						//{
						//	label: "\{\{future bridge\}\}: planned or proposed future bridge",
						//	value: "future bridge"
						//},
						//{
						//	label: "\{\{future Canadian public transportation\}\}: planned or expected public transportation infrastructure in Canada",
						//	value: "future Canadian public transportation"
						//},
						//{
						//	label: "\{\{future Chinese public transportation\}\}: planned or expected public transportation infrastructure in China",
						//	value: "future Chinese public transportation"
						//},
						//{
						//	label: "\{\{concept automobile\}\}: concept automobile",
						//	value: "concept automobile"
						//},
						//{
						//	label: "\{\{future French public transportation\}\}: planned or expected public transportation infrastructure in France",
						//	value: "future French public transportation"
						//},
						//{
						//	label: "\{\{future London transport infrastructure\}\}: planned or expected London Transport infrastructure",
						//	value: "future London transport infrastructure"
						//},
						//{
						//	label: "\{\{future motorcycle\}\}: scheduled or anticipated future motorcycle",
						//	value: "future motorcycle"
						//},
						{
							label: "\{\{future public transportation\}\}: 本文是關於未來的公共運輸建設或計劃",
							value: "future public transportation"
						}
						//{
						//	label: "\{\{future railway station\}\}: planned or expected future railway station",
						//	value: "future railway station"
						//},
						//{
						//	label: "\{\{future road\}\}: planned or expected future road",
						//	value: "future road"
						//},
						//{
						//	label: "\{\{future ship\}\}: planned or expected future ship",
						//	value: "future ship"
						//},
						//{
						//	label: "\{\{future tunnel\}\}: planned or expected future tunnel",
						//	value: "future tunnel"
						//},
						//{
						//	label: "\{\{future UK public transportation\}\}: planned or expected public transportation in the United Kingdom",
						//	value: "future UK public transportation"
						//},
						//{
						//	label: "\{\{future USA public transportation\}\}: proposed, planned, or expected public transportation infrastructure in the United States",
						//	value: "future USA public transportation"
						//}
					]
				},
				{
					label: "Sports",
					list: [
						//{
						//	label: "\{\{future arena\}\}: planned or proposed arena",
						//	value: "future arena"
						//},
						{
							label: "\{\{future go\}\}: 此條目是關於一項預定進行的圍棋賽",
							value: "future go"
						},
						//{
						//	label: "\{\{future motor sport\}\}: future motor sporting event or team",
						//	value: "future motor sport"
						//},
						//{
						//	label: "\{\{future pw\}\}: scheduled professional wrestling event that is taking place in the future",
						//	value: "future pw"
						//},
						{
							label: "\{\{future sport\}\}: 此條目是關於一項預定進行的體育競賽",
							value: "future sport"
						}
						//{
						//	label: "\{\{future sports venue\}\}: planned or expected sports venue",
						//	value: "future sports venue"
						//},
						//{
						//	label: "\{\{future stadium\}\}: planned or proposed stadium",
						//	value: "future stadium"
						//}
					]
				}
			]
		}
	},
	//{
	//	label: '\{\{goceinuse\}\}: article is currently undergoing a major copy edit by the Guild of Copy Editors',
	//	value: 'goceinuse' },
	{
		label: '\{\{inuse\}\}: 這篇文章正在進行重大修改',
		value: 'inuse' },
	{
		label: '\{\{underconstruction\}\}: 這個條目是一個擴展或大修改,它並未供使用',
		value: 'underconstruction' }
];
 
 
//friendlytag.spellingList = [
//	{
//		label: '\{\{R from abbreviation\}\}: redirect from a title with an abbreviation',
//		value: 'R from abbreviation' 
//	},
//	{
//		label: '\{\{R to list entry\}\}: redirect to a \"list of minor entities\"-type article which is a collection of brief descriptions for subjects not notable enough to have separate articles',
//		value: 'R to list entry' 
//	},
//	{
//		label: '\{\{R to section\}\}: sames as \{\{R to list entry\}\}, but when list is more sectionlike in organization, such as list of fictional characters in a fictional universe.',
//		value: 'R to section' 
//	},
//	{
//		label: '\{\{R from misspelling\}\}: redirect from a misspelling or typographical error',
//		value: 'R from misspelling' 
//	},
//	{
//		label: '\{\{R from alternative spelling\}\}: redirect from a title with a different spelling',
//		value: 'R from alternative spelling' 
//	},
//	{
//		label: '\{\{R from plural\}\}: redirect from a plural word to the singular equivalent',
//		value: 'R from plural' 
//	},
//	{
//		label: '\{\{R from related word\}\}: redirect from a related word',
//		value: 'R from related word' 
//	},
//	{
//		label: '\{\{R with possibilities\}\}: redirect from a title for a topic more detailed than what is currently provided on the target page, or section of that page, hence something which can and should be expanded',
//		value: 'R with possibilities' 
//	},
//	{
//		label: '\{\{R from member\}\}: redirect from a person who is a member of a group to more general related topics, such as the group, organization, ensemble or team that he or she belongs to',
//		value: 'R from member' 
//	},
//	{
//		label: '\{\{R from other capitalisation\}\}: redirect from a title with another method of capitalisation',
//		value: 'R from other capitalisation'
//	}
//];
//friendlytag.alternativeList = [
//	{
//		label: '\{\{R from alternative name\}\}: redirect from a title that is another name, a pseudonym, a nickname, or a synonym',
//		value: 'R from alternative name' 
//	},
//	{
//		label: '\{\{R from full name\}\}: redirect from a title that is a complete or more complete name',
//		value: 'R from full name' 
//	},
//	{
//		label: '\{\{R from surname\}\}: redirect from a title that is a surname',
//		value: 'R from surname' 
//	},
//	{
//		label: '\{\{R from historic name\}\}: redirect from a title that is another name, a pseudonym, a nickname, or a synonym that has a significant historic past as a region, state, principate\'s holding, city, city-state or such, but which region has been subsumed into a modern era municipality, district or state, or otherwise suffered from a name change over time',
//		value: 'R from historic name' 
//	},
//	{
//		label: '\{\{R from scientific name\}\}: redirect from the scientific name to the common name',
//		value: 'R from scientific name' 
//	},
//	{
//		label: '\{\{R to scientific name\}\}: redirect from the common name to the scientific name',
//		value: 'R to scientific name' 
//	},
//	{
//		label: '\{\{R from name and country\}\}: redirect from the specific name to the briefer name',
//		value: 'R from name and country' 
//	},
//	{
//		label: '\{\{R from alternative language\}\}: redirect from an English name to a name in another language, or vice-versa',
//		value: 'R from alternative language' 
//	},
//	{
//		label: '\{\{R from ASCII\}\}: redirect from a title in basic ASCII to the formal article title, with differences that are not diacritical marks (accents, umlauts, etc.)',
//		value: 'R from ASCII' 
//	},
//	{
//		label: '\{\{R from title without diacritics\}\}: redirect to the article title with diacritical marks (accents, umlauts, etc.)',
//		value: 'R from title without diacritics'
//	}
//];
 
//friendlytag.administrativeList = [
//	{
//		label: '\{\{R from merge\}\}: redirect from a merged page in order to preserve its edit history',
//		value: 'R from merge' 
//	},
//	{
//		label: '\{\{R to disambiguation page\}\}: redirect to a disambiguation page',
//		value: 'R to disambiguation page' 
//	},
//	{
//		label: '\{\{R from duplicated article\}\}: redirect to a similar article in order to preserve its edit history',
//		value: 'R from duplicated article' 
//	},
//	{
//		label: '\{\{R for as of\}\}: redirect page affects an \"as of ...\" link',
//		value: 'R for as of' 
//	},
//	{
//		label: '\{\{R to decade\}\}: redirect from a year to the decade article',
//		value: 'R to decade' 
//	},
//	{
//		label: '\{\{R from shortcut\}\}: redirect from a Wikipedia shortcut',
//		value: 'R from shortcut' 
//	},
//	{
//		label: '\{\{R from CamelCase\}\}: redirect from a CamelCase title',
//		value: 'R from CamelCase' 
//	},
//	{
//		label: '\{\{R from EXIF\}\}: redirect of a wikilink created from JPEG EXIF information (i.e. the \"metadata\" section on some image description pages)',
//		value: 'R from EXIF' 
//	},
//	{
//		label: '\{\{R from school\}\}: redirect from a school article that had very little information',
//		value: 'R from school'
//	}
//];
 
// Set to true if template can be grouped into {{articleissues}}
friendlytag.groupHash = {
	'3O': true,
	'advert': true,
	'autobiography': true,
	'biased': true,
	'blpdispute': true,
	'BLPrefimprove': true,
	'BLPsources': true,
	'BLP sources': true,
	'BLPunsourced': true,
	'BLPunreferenced': true,
	'BLPunref': true,
	'citations missing': true,
	'citationstyle': true,
	'citecheck': true,
	'cleanup': true,
	'COI': true,
	'coi': true,
	'colloquial': true,
	'confusing': true,
	'context': true,
	'contradict': true,
	'copyedit': true,
	'criticisms': true,
	'crystal': true,
	'deadend': true,
	'disputed': true,
	'do-attempt': true,
	'essay': true,
	'essay-like': true,
	'examplefarm': true,
	'expand': true,
	'expert': true,
	'external links': true,
	'fancruft': true,
	'fansite': true,
	'fiction': true,
	'gameguide': true,
	'globalize': true,
	'grammar': true,
	'histinfo': true,
	'hoax': true,
	'howto': true,
	'importance': true,
	'inappropriate person': true,
	'incomplete': true,
	'intro length': true,
	'intromissing': true,
	'introrewrite': true,
	'intro-toolong': true,
	'intro-tooshort': true,
	'in-universe': true,
	'jargon': true,
	'laundry': true,
	'laundrylists': true,
	'likeresume': true,
	'long': true,
	'newsrelease': true,
	'notability': true,
	'notable': true,
	'NPOV': true,
	'npov': true,
	'onesource': true,
	'OR': true,
	'or': true,
	'original research': true,
	'out of date': true,
	'peacock': true,
	'plot': true,
	'POV': true,
	'pov': true,
	'primarysources': true,
	'prose': true,
	'proseline': true,
	'quotefarm': true,
	'recent': true,
	'refimprove': true,
	'refimproveBLP': true,
	'restructure': true,
	'review': true,
	'rewrite': true,
	'roughtranslation': true,
	'sections': true,
	'self-published': true,
	'spam': true,
	'story': true,
	'synthesis': true,
	'technical': true,
	'tone': true,
	'toolong': true,
	'tooshort': true,
	'travelguide': true,
	'trivia': true,
	'unbalanced': true,
	'unencyclopedic': true,
	'unref': true,
	'unreferenced': true,
	'unrefBLP': true,
	'unreferencedBLP': true,
	'update': true,
	'verylong': true,
	'weasel': true,
	'wikify': true
}
 
friendlytag.callbacks = {
	main: function( self ) {
		var form = self.responseXML.getElementById( 'editform' );
		var tagRe, text = '', summaryText = 'Added';
		var tags = new Array(), groupableTags = new Array();
 
		if( !isRedirect ) {
			// Check for preexisting tags and separate tags into groupable and non-groupable arrays
			Status.info( 'Info', 'Checking for preexisting tags on the article' );
			for( var i = 0; i < self.params.tags.length; i++ ) {
				tagRe = new RegExp( '(\\{\\{' + self.params.tags[i] + '(\\||\\}\\}))', 'im' );
				if( !tagRe.exec( form.wpTextbox1.value ) ) {
					if( friendlytag.groupHash[ self.params.tags[i] ] ) {
						groupableTags = groupableTags.concat( self.params.tags[i] );
					} else {
						tags = tags.concat( self.params.tags[i] );
					}
				} else {
					Status.info( 'Info', 'Found \{\{' + self.params.tags[i]
						+ '\}\} on the article already...excluding' );
				}
			}
 
			if( self.params.group && groupableTags.length >= 3 ) {
				Status.info( 'Info', 'Grouping supported tags into \{\{article issues\}\}' );
 
				groupableTags.sort();
				text += '\{\{article issues';
				summaryText += ' \{\{[[Template:article issues|article issues]]\}\} with parameters';
				for( var i = 0; i < groupableTags.length; i++ ) {
					text += '|' + groupableTags[i]
					+ '=\{\{subst:#time:c\}\}年\{\{subst:CURRENTMONTHNAME\}\}';
 
					if( i == (groupableTags.length - 1) ) {
						summaryText += ' and';
					} else if ( i < (groupableTags.length - 1) && i != 0 ) {
						summaryText += ',';
					}
					summaryText += ' ' + groupableTags[i];
				}
				text += '\}\}\n';
			} else {
				tags = tags.concat( groupableTags );
			}
		} else {
			// Check for preexisting tags
			Status.info( 'Info', 'Checking for preexisting tags on the redirect' );
			for( var i = 0; i < self.params.tags.length; i++ ) {
				tagRe = new RegExp( '(\\{\\{' + self.params.tags[i] + '(\\||\\}\\}))', 'im' );
				if( !tagRe.exec( form.wpTextbox1.value ) ) {
					tags = tags.concat( self.params.tags[i] );
				} else {
					Status.info( 'Info', 'Found \{\{' + self.params.tags[i]
						+ '\}\} on the redirect already...excluding' );
				}
			}
		}
 
		tags.sort();
		for( var i = 0; i < tags.length; i++ ) {
			if( tags[i] == 'uncategorized' || tags[i] == 'catimprove' ) {
				form.wpTextbox1.value += '\n\n\{\{' + tags[i]
				+ '|time=\{\{subst:#time:c\}\}\}\}';
			} else {
				if( tags[i] == 'globalize' ) {
					text += '\{\{' + self.params.globalizeSubcategory;
				} else if( tags[i] == 'current' ) {
					text += '\{\{' + self.params.currentSubcategory;
				} else if( tags[i] == 'future' ) {
					text += '\{\{' + self.params.futureSubcategory;
				} else {
					text += ( isRedirect ? '\n' : '' ) + '\{\{' + tags[i];
				}
 
				if( tags[i] == 'notability' && self.params.notabilitySubcategory != 'none' ) {
					text += '|' + self.params.notabilitySubcategory;
				}
 
				if( tags[i] == 'do-attempt' ) {
					text += '|att=\{\{subst:#time:c\}\}\}\}\n';
				} else {
					text += isRedirect ? '\}\}' : '|time=\{\{subst:#time:c\}\}\}\}\n';
				}
			}
 
			if( i == (tags.length - 1) && ( i > 0 || groupableTags.length > 3 ) ) {
				summaryText += ' and';
			} else if ( i < (tags.length - 1) && ( i != 0 || groupableTags.length > 3 ) ) {
				summaryText += ',';
			}
 
			summaryText += ' \{\{[[Template:';
			if( tags[i] == 'globalize' ) {
				summaryText += self.params.globalizeSubcategory + '|' + self.params.globalizeSubcategory;			
			} else if( tags[i] == 'current' ) {
				summaryText += self.params.currentSubcategory + '|' + self.params.currentSubcategory;
			} else if( tags[i] == 'future' ) {
				summaryText += self.params.futureSubcategory + '|' + self.params.futureSubcategory;
			} else {
				summaryText += tags[i] + '|' + tags[i];
			}
			summaryText += ']]\}\}';
		}
 
		if( !isRedirect ) {
			text += form.wpTextbox1.value;
		} else {
			text = form.wpTextbox1.value + text;
		}
		summaryText += ' tag' + ( ( tags.length + ( groupableTags.length > 3 ? 1 : 0 ) ) > 1 ? 's' : '' )
		+ ' to ' + ( isRedirect ? 'redirect.' : 'article.' ) + FriendlyConfig.summaryAd;
 
		var postData = {
			'wpMinoredit': FriendlyConfig.markTaggedPagesAsMinor ? 1 : undefined,
			'wpWatchthis': form.wpWatchthis.checked ? 1 : (FriendlyConfig.watchTaggedPages ? 1 : undefined),
			'wpStarttime': form.wpStarttime.value,
			'wpEdittime': form.wpEdittime.value,
			'wpAutoSummary': form.wpAutoSummary.value,
			'wpEditToken': form.wpEditToken.value,
			'wpSummary': summaryText,
			'wpTextbox1': text
		};
 
		self.post( postData );
 
		if( FriendlyConfig.markTaggedPagesAsPatrolled && self.params.rcid != '' ) {
			var query = {
				'title': wgPageName,
				'action': 'markpatrolled',
				'rcid': self.params.rcid
			};
 
			var wikipedia_wiki = new Wikipedia.wiki( 'Marking page as patrolled', query );
			wikipedia_wiki.post();
		}
	}
}
 
friendlytag.callback.evaluate = function friendlytagCallbackEvaluate(e) {
	var form = e.target;
	if( isRedirect ) {
		var tags = form.getChecked( 'administrative' ).concat( form.getChecked( 'alternative' ) ).concat( form.getChecked( 'spelling' ) );
	} else {
		if( typeof( FriendlyConfig.customTagList ) == 'object' ) {
			var tags = form.getChecked( 'notice' ).concat( form.getChecked( 'problem' ) ).concat( form.getChecked( 'maintenance' ) ).concat( form.getChecked( 'custom' ) );
		} else {
			var tags = form.getChecked( 'notice' ).concat( form.getChecked( 'problem' ) ).concat( form.getChecked( 'maintenance' ) );
		}
		var globalizeSubcategory = form.getChecked( 'problem.globalize' );
		var notabilitySubcategory = form.getChecked( 'problem.notability' );
		var currentSubcategory = form.getChecked( 'notice.current' );
		var futureSubcategory = form.getChecked( 'notice.future' );
	}
	var params;
 
	if( tags.length == 0 ) {
		alert( 'You must select at least one tag!' );
		return;
	}
	if( !isRedirect ) {
		params = {
			tags: tags,
			group: form.group.checked,
			globalizeSubcategory: globalizeSubcategory ? globalizeSubcategory[0] : null,
			notabilitySubcategory: notabilitySubcategory ? notabilitySubcategory[0] : null,
			currentSubcategory: currentSubcategory ? currentSubcategory[0] : null,
			futureSubcategory: futureSubcategory ? futureSubcategory[0] : null,
			rcid: QueryString.exists( 'rcid' ) ? QueryString.get( 'rcid' ) : ''
		}
	} else {
		params = {
			tags: tags,
			rcid: QueryString.exists( 'rcid' ) ? QueryString.get( 'rcid' ) : ''
		}
	}
 
	Status.init( form );
 
	var query = { 
		'title': wgPageName, 
		'action': 'submit'
	};
	Wikipedia.actionCompleted.redirect = wgPageName;
	Wikipedia.actionCompleted.notice = "Tagging complete, reloading article in some seconds";
	var wikipedia_wiki = new Wikipedia.wiki( 'Article modification', query, friendlytag.callbacks.main );
	wikipedia_wiki.params = params;
	wikipedia_wiki.get();
}
// </nowiki>