<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://zybkcn.com/w/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AGadget-twinklestub.js</id>
	<title>MediaWiki:Gadget-twinklestub.js - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://zybkcn.com/w/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AGadget-twinklestub.js"/>
	<link rel="alternate" type="text/html" href="https://zybkcn.com/w/index.php?title=MediaWiki:Gadget-twinklestub.js&amp;action=history"/>
	<updated>2026-05-04T09:02:02Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://zybkcn.com/w/index.php?title=MediaWiki:Gadget-twinklestub.js&amp;diff=26445&amp;oldid=prev</id>
		<title>入我相思门：​创建页面，内容为“// &lt;nowiki&gt;   (function($) {   /*  ****************************************  *** twinklestub.js: Tag module  ****************************************  * Mode of invocation:     Tab (&quot;Stub&quot;)  * Active on:              Existing articles  * Config directives in:   FriendlyConfig  * Note:                   customised friendlytag module (for SEWP)  */  Twinkle.stub = function friendlytag() { 	if (Morebits.isPageRedirect()) { 		// Skip 	// article/draft article taggi…”</title>
		<link rel="alternate" type="text/html" href="https://zybkcn.com/w/index.php?title=MediaWiki:Gadget-twinklestub.js&amp;diff=26445&amp;oldid=prev"/>
		<updated>2022-12-08T06:55:46Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“// &amp;lt;nowiki&amp;gt;   (function($) {   &lt;span class=&quot;autocomment&quot;&gt;****************************************  *** twinklestub.js: Tag module  ****************************************  * Mode of invocation:     Tab (&amp;quot;Stub&amp;quot;)  * Active on:              Existing articles  * Config directives in:   FriendlyConfig  * Note:                   customised friendlytag module (for SEWP)：​&lt;/span&gt;  Twinkle.stub = function friendlytag() { 	if (Morebits.isPageRedirect()) { 		// Skip 	// article/draft article taggi…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;// &amp;lt;nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(function($) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
 ****************************************&lt;br /&gt;
 *** twinklestub.js: Tag module&lt;br /&gt;
 ****************************************&lt;br /&gt;
 * Mode of invocation:     Tab (&amp;quot;Stub&amp;quot;)&lt;br /&gt;
 * Active on:              Existing articles&lt;br /&gt;
 * Config directives in:   FriendlyConfig&lt;br /&gt;
 * Note:                   customised friendlytag module (for SEWP)&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
Twinkle.stub = function friendlytag() {&lt;br /&gt;
	if (Morebits.isPageRedirect()) {&lt;br /&gt;
		// Skip&lt;br /&gt;
	// article/draft article tagging&lt;br /&gt;
	} else if (((mw.config.get(&amp;#039;wgNamespaceNumber&amp;#039;) === 0 || mw.config.get(&amp;#039;wgNamespaceNumber&amp;#039;) === 118) &amp;amp;&amp;amp; mw.config.get(&amp;#039;wgCurRevisionId&amp;#039;)) || (Morebits.pageNameNorm === Twinkle.getPref(&amp;#039;sandboxPage&amp;#039;))) {&lt;br /&gt;
		Twinkle.stub.mode = wgULS(&amp;#039;条目&amp;#039;, &amp;#039;條目&amp;#039;);&lt;br /&gt;
		Twinkle.addPortletLink(Twinkle.stub.callback, &amp;#039;小作品&amp;#039;, &amp;#039;friendly-tag&amp;#039;, wgULS(&amp;#039;标记小作品&amp;#039;, &amp;#039;標記小作品&amp;#039;));&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Twinkle.stub.callback = function friendlytagCallback() {&lt;br /&gt;
	var Window = new Morebits.simpleWindow(630, Twinkle.stub.mode === &amp;#039;article&amp;#039; ? 450 : 400);&lt;br /&gt;
	Window.setScriptName(&amp;#039;Twinkle&amp;#039;);&lt;br /&gt;
	Window.addFooterLink(&amp;#039;小作品說明&amp;#039;, &amp;#039;Wikipedia:小作品&amp;#039;);&lt;br /&gt;
	Window.addFooterLink(wgULS(&amp;#039;小作品设置&amp;#039;, &amp;#039;小作品設定&amp;#039;), &amp;#039;WP:TW/PREF#stub&amp;#039;);&lt;br /&gt;
	Window.addFooterLink(wgULS(&amp;#039;Twinkle帮助&amp;#039;, &amp;#039;Twinkle說明&amp;#039;), &amp;#039;WP:TW/DOC#stub&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
	var form = new Morebits.quickForm(Twinkle.stub.callback.evaluate);&lt;br /&gt;
&lt;br /&gt;
	if (document.getElementsByClassName(&amp;#039;patrollink&amp;#039;).length) {&lt;br /&gt;
		form.append({&lt;br /&gt;
			type: &amp;#039;checkbox&amp;#039;,&lt;br /&gt;
			list: [&lt;br /&gt;
				{&lt;br /&gt;
					label: wgULS(&amp;#039;标记页面为已巡查&amp;#039;, &amp;#039;標記頁面為已巡查&amp;#039;),&lt;br /&gt;
					value: &amp;#039;patrolPage&amp;#039;,&lt;br /&gt;
					name: &amp;#039;patrolPage&amp;#039;,&lt;br /&gt;
					checked: Twinkle.getPref(&amp;#039;markStubbedPagesAsPatrolled&amp;#039;)&lt;br /&gt;
				}&lt;br /&gt;
			]&lt;br /&gt;
		});&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	switch (Twinkle.stub.mode) {&lt;br /&gt;
		case &amp;#039;條目&amp;#039;:&lt;br /&gt;
		case &amp;#039;条目&amp;#039;:&lt;br /&gt;
			Window.setTitle(wgULS(&amp;#039;条目小作品标记&amp;#039;, &amp;#039;條目小作品標記&amp;#039;));&lt;br /&gt;
&lt;br /&gt;
			form.append({&lt;br /&gt;
				type: &amp;#039;select&amp;#039;,&lt;br /&gt;
				name: &amp;#039;sortorder&amp;#039;,&lt;br /&gt;
				label: wgULS(&amp;#039;查看列表：&amp;#039;, &amp;#039;檢視列表：&amp;#039;),&lt;br /&gt;
				tooltip: wgULS(&amp;#039;您可以在Twinkle参数设置（WP:TWPREFS）中更改此项。&amp;#039;, &amp;#039;您可以在Twinkle偏好設定（WP:TWPREFS）中更改此項。&amp;#039;),&lt;br /&gt;
				event: Twinkle.stub.updateSortOrder,&lt;br /&gt;
				list: [&lt;br /&gt;
					{ type: &amp;#039;option&amp;#039;, value: &amp;#039;cat&amp;#039;, label: wgULS(&amp;#039;按类型&amp;#039;, &amp;#039;按類別&amp;#039;), selected: Twinkle.getPref(&amp;#039;stubArticleSortOrder&amp;#039;) === &amp;#039;cat&amp;#039; },&lt;br /&gt;
					{ type: &amp;#039;option&amp;#039;, value: &amp;#039;alpha&amp;#039;, label: &amp;#039;按字母&amp;#039;, selected: Twinkle.getPref(&amp;#039;stubArticleSortOrder&amp;#039;) === &amp;#039;alpha&amp;#039; }&lt;br /&gt;
				]&lt;br /&gt;
			});&lt;br /&gt;
&lt;br /&gt;
			form.append({ type: &amp;#039;div&amp;#039;, id: &amp;#039;tagWorkArea&amp;#039; });&lt;br /&gt;
			break;&lt;br /&gt;
&lt;br /&gt;
		default:&lt;br /&gt;
			alert(&amp;#039;Twinkle.stub：未知模式 &amp;#039; + Twinkle.stub.mode);&lt;br /&gt;
			break;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	form.append({ type: &amp;#039;submit&amp;#039; });&lt;br /&gt;
&lt;br /&gt;
	var result = form.render();&lt;br /&gt;
	Window.setContent(result);&lt;br /&gt;
	Window.display();&lt;br /&gt;
&lt;br /&gt;
	if (Twinkle.stub.mode === &amp;#039;条目&amp;#039; || Twinkle.stub.mode === &amp;#039;條目&amp;#039;) {&lt;br /&gt;
		// fake a change event on the sort dropdown, to initialize the tag list&lt;br /&gt;
		var evt = document.createEvent(&amp;#039;Event&amp;#039;);&lt;br /&gt;
		evt.initEvent(&amp;#039;change&amp;#039;, true, true);&lt;br /&gt;
		result.sortorder.dispatchEvent(evt);&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Twinkle.stub.checkedTags = [];&lt;br /&gt;
&lt;br /&gt;
Twinkle.stub.updateSortOrder = function(e) {&lt;br /&gt;
	var sortorder = e.target.value;&lt;br /&gt;
&lt;br /&gt;
	Twinkle.stub.checkedTags = e.target.form.getChecked(&amp;#039;articleTags&amp;#039;);&lt;br /&gt;
	if (!Twinkle.stub.checkedTags) {&lt;br /&gt;
		Twinkle.stub.checkedTags = [];&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	var container = new Morebits.quickForm.element({ type: &amp;#039;fragment&amp;#039; });&lt;br /&gt;
&lt;br /&gt;
	// function to generate a checkbox, with appropriate subgroup if needed&lt;br /&gt;
	var makeCheckbox = function(tag, description) {&lt;br /&gt;
		var checkbox = { value: tag, label: &amp;#039;{{&amp;#039; + tag + &amp;#039;}}: &amp;#039; + description };&lt;br /&gt;
		if (Twinkle.stub.checkedTags.indexOf(tag) !== -1) {&lt;br /&gt;
			checkbox.checked = true;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return checkbox;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	// append any custom tags&lt;br /&gt;
	if (Twinkle.getPref(&amp;#039;customStubList&amp;#039;).length) {&lt;br /&gt;
		container.append({ type: &amp;#039;header&amp;#039;, label: wgULS(&amp;#039;自定义模板&amp;#039;, &amp;#039;自訂模板&amp;#039;) });&lt;br /&gt;
		var customcheckboxes = [];&lt;br /&gt;
		$.each(Twinkle.getPref(&amp;#039;customStubList&amp;#039;), function(_, item) {&lt;br /&gt;
			customcheckboxes.push(makeCheckbox(item.value, item.label));&lt;br /&gt;
		});&lt;br /&gt;
		container.append({&lt;br /&gt;
			type: &amp;#039;checkbox&amp;#039;,&lt;br /&gt;
			name: &amp;#039;articleTags&amp;#039;,&lt;br /&gt;
			list: customcheckboxes&lt;br /&gt;
		});&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// categorical sort order&lt;br /&gt;
	if (sortorder === &amp;#039;cat&amp;#039;) {&lt;br /&gt;
		// function to iterate through the tags and create a checkbox for each one&lt;br /&gt;
		var doCategoryCheckboxes = function(subdiv, array) {&lt;br /&gt;
			var checkboxes = [];&lt;br /&gt;
			$.each(array, function(k, tag) {&lt;br /&gt;
				var description = Twinkle.stub.article.tags[tag];&lt;br /&gt;
				checkboxes.push(makeCheckbox(tag, description));&lt;br /&gt;
			});&lt;br /&gt;
			subdiv.append({&lt;br /&gt;
				type: &amp;#039;checkbox&amp;#039;,&lt;br /&gt;
				name: &amp;#039;articleTags&amp;#039;,&lt;br /&gt;
				list: checkboxes&lt;br /&gt;
			});&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		var i = 0;&lt;br /&gt;
		// go through each category and sub-category and append lists of checkboxes&lt;br /&gt;
		$.each(Twinkle.stub.article.tagCategories, function(title, content) {&lt;br /&gt;
			container.append({ type: &amp;#039;header&amp;#039;, id: &amp;#039;tagHeader&amp;#039; + i, label: title });&lt;br /&gt;
			var subdiv = container.append({ type: &amp;#039;div&amp;#039;, id: &amp;#039;tagSubdiv&amp;#039; + i++ });&lt;br /&gt;
			if ($.isArray(content)) {&lt;br /&gt;
				doCategoryCheckboxes(subdiv, content);&lt;br /&gt;
			} else {&lt;br /&gt;
				$.each(content, function(subtitle, subcontent) {&lt;br /&gt;
					subdiv.append({ type: &amp;#039;div&amp;#039;, label: [Morebits.htmlNode(&amp;#039;b&amp;#039;, subtitle)] });&lt;br /&gt;
					doCategoryCheckboxes(subdiv, subcontent);&lt;br /&gt;
				});&lt;br /&gt;
			}&lt;br /&gt;
		});&lt;br /&gt;
	// alphabetical sort order&lt;br /&gt;
	} else {&lt;br /&gt;
		var checkboxes = [];&lt;br /&gt;
		$.each(Twinkle.stub.article.tags, function(tag, description) {&lt;br /&gt;
			checkboxes.push(makeCheckbox(tag, description));&lt;br /&gt;
		});&lt;br /&gt;
		container.append({&lt;br /&gt;
			type: &amp;#039;checkbox&amp;#039;,&lt;br /&gt;
			name: &amp;#039;articleTags&amp;#039;,&lt;br /&gt;
			list: checkboxes&lt;br /&gt;
		});&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	var $workarea = $(e.target.form).find(&amp;#039;div#tagWorkArea&amp;#039;);&lt;br /&gt;
	var rendered = container.render();&lt;br /&gt;
	$workarea.empty().append(rendered);&lt;br /&gt;
&lt;br /&gt;
	// style adjustments&lt;br /&gt;
	$workarea.find(&amp;#039;h5&amp;#039;).css({ &amp;#039;font-size&amp;#039;: &amp;#039;110%&amp;#039; });&lt;br /&gt;
	$workarea.find(&amp;#039;h5:not(:first-child)&amp;#039;).css({ &amp;#039;margin-top&amp;#039;: &amp;#039;1em&amp;#039; });&lt;br /&gt;
	$workarea.find(&amp;#039;div&amp;#039;).filter(&amp;#039;:has(span.quickformDescription)&amp;#039;).css({ &amp;#039;margin-top&amp;#039;: &amp;#039;0.4em&amp;#039; });&lt;br /&gt;
&lt;br /&gt;
	// add a link to each template&amp;#039;s description page&lt;br /&gt;
	$.each(Morebits.quickForm.getElements(e.target.form, &amp;#039;articleTags&amp;#039;), function(index, checkbox) {&lt;br /&gt;
		var $checkbox = $(checkbox);&lt;br /&gt;
		var link = Morebits.htmlNode(&amp;#039;a&amp;#039;, &amp;#039;&amp;gt;&amp;#039;);&lt;br /&gt;
		link.setAttribute(&amp;#039;class&amp;#039;, &amp;#039;tag-template-link&amp;#039;);&lt;br /&gt;
		link.setAttribute(&amp;#039;href&amp;#039;, mw.util.getUrl(&amp;#039;Template:&amp;#039; +&lt;br /&gt;
			Morebits.string.toUpperCaseFirstChar(checkbox.values)));&lt;br /&gt;
		link.setAttribute(&amp;#039;target&amp;#039;, &amp;#039;_blank&amp;#039;);&lt;br /&gt;
		$checkbox.parent().append([&amp;#039;\u00A0&amp;#039;, link]);&lt;br /&gt;
	});&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Tags for ARTICLES start here&lt;br /&gt;
&lt;br /&gt;
Twinkle.stub.article = {};&lt;br /&gt;
&lt;br /&gt;
// A list of all article tags, in alphabetical order&lt;br /&gt;
// To ensure tags appear in the default &amp;quot;categorized&amp;quot; view, add them to the tagCategories hash below.&lt;br /&gt;
&lt;br /&gt;
Twinkle.stub.article.tags = wgULS({&lt;br /&gt;
	&amp;#039;actor-stub&amp;#039;: &amp;#039;演员&amp;#039;,&lt;br /&gt;
	&amp;#039;asia-stub&amp;#039;: &amp;#039;亚洲&amp;#039;,&lt;br /&gt;
	&amp;#039;bio-stub&amp;#039;: &amp;#039;人物&amp;#039;,&lt;br /&gt;
	&amp;#039;biology-stub&amp;#039;: &amp;#039;生物学&amp;#039;,&lt;br /&gt;
	&amp;#039;chem-stub&amp;#039;: &amp;#039;化学&amp;#039;,&lt;br /&gt;
	&amp;#039;europe-stub&amp;#039;: &amp;#039;欧洲&amp;#039;,&lt;br /&gt;
	&amp;#039;expand list&amp;#039;: &amp;#039;未完成列表&amp;#039;,&lt;br /&gt;
	&amp;#039;food-stub&amp;#039;: &amp;#039;食物&amp;#039;,&lt;br /&gt;
	&amp;#039;france-geo-stub&amp;#039;: &amp;#039;法国地理&amp;#039;,&lt;br /&gt;
	&amp;#039;geo-stub&amp;#039;: &amp;#039;地理位置&amp;#039;,&lt;br /&gt;
	&amp;#039;hist-stub&amp;#039;: &amp;#039;历史或历史学&amp;#039;,&lt;br /&gt;
	&amp;#039;JP-stub&amp;#039;: &amp;#039;日本&amp;#039;,&lt;br /&gt;
	&amp;#039;lit-stub&amp;#039;: &amp;#039;文学&amp;#039;,&lt;br /&gt;
	&amp;#039;math-stub&amp;#039;: &amp;#039;数学&amp;#039;,&lt;br /&gt;
	&amp;#039;med-stub&amp;#039;: &amp;#039;医学&amp;#039;,&lt;br /&gt;
	&amp;#039;mil-stub&amp;#039;: &amp;#039;军事&amp;#039;,&lt;br /&gt;
	&amp;#039;movie-stub&amp;#039;: &amp;#039;电影&amp;#039;,&lt;br /&gt;
	&amp;#039;music-stub&amp;#039;: &amp;#039;音乐&amp;#039;,&lt;br /&gt;
	&amp;#039;physics-stub&amp;#039;: &amp;#039;物理学&amp;#039;,&lt;br /&gt;
	&amp;#039;politic-stub&amp;#039;: &amp;#039;政治&amp;#039;,&lt;br /&gt;
	&amp;#039;religion-stub&amp;#039;: &amp;#039;宗教&amp;#039;,&lt;br /&gt;
	&amp;#039;science-stub&amp;#039;: &amp;#039;科学&amp;#039;,&lt;br /&gt;
	&amp;#039;sport-stub&amp;#039;: &amp;#039;体育&amp;#039;,&lt;br /&gt;
	&amp;#039;stub&amp;#039;: &amp;#039;通用小作品&amp;#039;,&lt;br /&gt;
	&amp;#039;switzerland-stub&amp;#039;: &amp;#039;瑞士&amp;#039;,&lt;br /&gt;
	&amp;#039;tech-stub&amp;#039;: &amp;#039;科技&amp;#039;,&lt;br /&gt;
	&amp;#039;transp-stub&amp;#039;: &amp;#039;交通&amp;#039;,&lt;br /&gt;
	&amp;#039;TV-stub&amp;#039;: &amp;#039;电视&amp;#039;,&lt;br /&gt;
	&amp;#039;UK-stub&amp;#039;: &amp;#039;英国&amp;#039;,&lt;br /&gt;
	&amp;#039;US-bio-stub&amp;#039;: &amp;#039;美国人物&amp;#039;,&lt;br /&gt;
	&amp;#039;US-geo-stub&amp;#039;: &amp;#039;美国地理&amp;#039;,&lt;br /&gt;
	&amp;#039;US-stub&amp;#039;: &amp;#039;美国&amp;#039;,&lt;br /&gt;
	&amp;#039;weather-stub&amp;#039;: &amp;#039;天气和特别的天气事件&amp;#039;&lt;br /&gt;
}, {&lt;br /&gt;
	&amp;#039;actor-stub&amp;#039;: &amp;#039;演員&amp;#039;,&lt;br /&gt;
	&amp;#039;asia-stub&amp;#039;: &amp;#039;亞洲&amp;#039;,&lt;br /&gt;
	&amp;#039;bio-stub&amp;#039;: &amp;#039;人物&amp;#039;,&lt;br /&gt;
	&amp;#039;biology-stub&amp;#039;: &amp;#039;生物學&amp;#039;,&lt;br /&gt;
	&amp;#039;chem-stub&amp;#039;: &amp;#039;化學&amp;#039;,&lt;br /&gt;
	&amp;#039;europe-stub&amp;#039;: &amp;#039;歐洲&amp;#039;,&lt;br /&gt;
	&amp;#039;expand list&amp;#039;: &amp;#039;未完成列表&amp;#039;,&lt;br /&gt;
	&amp;#039;food-stub&amp;#039;: &amp;#039;食物&amp;#039;,&lt;br /&gt;
	&amp;#039;france-geo-stub&amp;#039;: &amp;#039;法國地理&amp;#039;,&lt;br /&gt;
	&amp;#039;geo-stub&amp;#039;: &amp;#039;地理位置&amp;#039;,&lt;br /&gt;
	&amp;#039;hist-stub&amp;#039;: &amp;#039;歷史或歷史學&amp;#039;,&lt;br /&gt;
	&amp;#039;JP-stub&amp;#039;: &amp;#039;日本&amp;#039;,&lt;br /&gt;
	&amp;#039;lit-stub&amp;#039;: &amp;#039;文學&amp;#039;,&lt;br /&gt;
	&amp;#039;math-stub&amp;#039;: &amp;#039;數學&amp;#039;,&lt;br /&gt;
	&amp;#039;med-stub&amp;#039;: &amp;#039;醫學&amp;#039;,&lt;br /&gt;
	&amp;#039;mil-stub&amp;#039;: &amp;#039;軍事&amp;#039;,&lt;br /&gt;
	&amp;#039;movie-stub&amp;#039;: &amp;#039;電影&amp;#039;,&lt;br /&gt;
	&amp;#039;music-stub&amp;#039;: &amp;#039;音樂&amp;#039;,&lt;br /&gt;
	&amp;#039;physics-stub&amp;#039;: &amp;#039;物理學&amp;#039;,&lt;br /&gt;
	&amp;#039;politic-stub&amp;#039;: &amp;#039;政治&amp;#039;,&lt;br /&gt;
	&amp;#039;religion-stub&amp;#039;: &amp;#039;宗教&amp;#039;,&lt;br /&gt;
	&amp;#039;science-stub&amp;#039;: &amp;#039;科學&amp;#039;,&lt;br /&gt;
	&amp;#039;sport-stub&amp;#039;: &amp;#039;體育&amp;#039;,&lt;br /&gt;
	&amp;#039;stub&amp;#039;: &amp;#039;通用小作品&amp;#039;,&lt;br /&gt;
	&amp;#039;switzerland-stub&amp;#039;: &amp;#039;瑞士&amp;#039;,&lt;br /&gt;
	&amp;#039;tech-stub&amp;#039;: &amp;#039;科技&amp;#039;,&lt;br /&gt;
	&amp;#039;transp-stub&amp;#039;: &amp;#039;交通&amp;#039;,&lt;br /&gt;
	&amp;#039;TV-stub&amp;#039;: &amp;#039;電視&amp;#039;,&lt;br /&gt;
	&amp;#039;UK-stub&amp;#039;: &amp;#039;英國&amp;#039;,&lt;br /&gt;
	&amp;#039;US-bio-stub&amp;#039;: &amp;#039;美國人物&amp;#039;,&lt;br /&gt;
	&amp;#039;US-geo-stub&amp;#039;: &amp;#039;美國地理&amp;#039;,&lt;br /&gt;
	&amp;#039;US-stub&amp;#039;: &amp;#039;美國&amp;#039;,&lt;br /&gt;
	&amp;#039;weather-stub&amp;#039;: &amp;#039;天氣和特別的天氣事件&amp;#039;&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
// A list of tags in order of category&lt;br /&gt;
// Tags should be in alphabetical order within the categories&lt;br /&gt;
// Add new categories with discretion - the list is long enough as is!&lt;br /&gt;
&lt;br /&gt;
/* eslint-disable quote-props */&lt;br /&gt;
Twinkle.stub.article.tagCategories = wgULS({&lt;br /&gt;
	&amp;#039;通用模板&amp;#039;: [&lt;br /&gt;
		&amp;#039;stub&amp;#039;,&lt;br /&gt;
		&amp;#039;expand list&amp;#039;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;#039;国家和地理&amp;#039;: [&lt;br /&gt;
		&amp;#039;asia-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;europe-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;france-geo-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;geo-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;JP-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;switzerland-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;UK-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;US-bio-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;US-geo-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;US-stub&amp;#039;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;#039;杂项&amp;#039;: [&lt;br /&gt;
		&amp;#039;food-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;hist-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;mil-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;politic-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;religion-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;transp-stub&amp;#039;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;#039;人物&amp;#039;: [&lt;br /&gt;
		&amp;#039;actor-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;bio-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;US-bio-stub&amp;#039;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;#039;科学&amp;#039;: [&lt;br /&gt;
		&amp;#039;biology-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;chem-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;math-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;med-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;physics-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;science-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;weather-stub&amp;#039;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;#039;体育&amp;#039;: [&lt;br /&gt;
		&amp;#039;sport-stub&amp;#039;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;#039;技术&amp;#039;: [&lt;br /&gt;
		&amp;#039;tech-stub&amp;#039;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;#039;艺术&amp;#039;: [&lt;br /&gt;
		&amp;#039;actor-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;lit-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;movie-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;music-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;TV-stub&amp;#039;&lt;br /&gt;
	]&lt;br /&gt;
}, {&lt;br /&gt;
	&amp;#039;通用模板&amp;#039;: [&lt;br /&gt;
		&amp;#039;stub&amp;#039;,&lt;br /&gt;
		&amp;#039;expand list&amp;#039;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;#039;國家和地理&amp;#039;: [&lt;br /&gt;
		&amp;#039;asia-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;europe-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;france-geo-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;geo-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;JP-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;switzerland-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;UK-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;US-bio-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;US-geo-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;US-stub&amp;#039;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;#039;雜項&amp;#039;: [&lt;br /&gt;
		&amp;#039;food-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;hist-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;mil-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;politic-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;religion-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;transp-stub&amp;#039;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;#039;人物&amp;#039;: [&lt;br /&gt;
		&amp;#039;actor-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;bio-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;US-bio-stub&amp;#039;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;#039;科學&amp;#039;: [&lt;br /&gt;
		&amp;#039;biology-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;chem-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;math-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;med-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;physics-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;science-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;weather-stub&amp;#039;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;#039;體育&amp;#039;: [&lt;br /&gt;
		&amp;#039;sport-stub&amp;#039;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;#039;技術&amp;#039;: [&lt;br /&gt;
		&amp;#039;tech-stub&amp;#039;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;#039;藝術&amp;#039;: [&lt;br /&gt;
		&amp;#039;actor-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;lit-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;movie-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;music-stub&amp;#039;,&lt;br /&gt;
		&amp;#039;TV-stub&amp;#039;&lt;br /&gt;
	]&lt;br /&gt;
});&lt;br /&gt;
/* eslint-enable quote-props */&lt;br /&gt;
&lt;br /&gt;
// Tags for REDIRECTS start here&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Twinkle.stub.callbacks = {&lt;br /&gt;
	main: function(pageobj) {&lt;br /&gt;
		var params = pageobj.getCallbackParameters(),&lt;br /&gt;
			tagRe, summaryText = &amp;#039;加入&amp;#039;,&lt;br /&gt;
			tags = [], groupableTags = [], i, totalTags;&lt;br /&gt;
&lt;br /&gt;
		// Remove tags that become superfluous with this action&lt;br /&gt;
		var pageText = pageobj.getPageText();&lt;br /&gt;
&lt;br /&gt;
		var addTag = function friendlytagAddTag(tagIndex, tagName) {&lt;br /&gt;
&lt;br /&gt;
			pageText += &amp;#039;\n{{&amp;#039; + tagName + &amp;#039;}}&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
			if (tagIndex &amp;gt; 0) {&lt;br /&gt;
				if (tagIndex === (totalTags - 1)) {&lt;br /&gt;
					summaryText += &amp;#039;和&amp;#039;;&lt;br /&gt;
				} else if (tagIndex &amp;lt; (totalTags - 1)) {&lt;br /&gt;
					summaryText += &amp;#039;、&amp;#039;;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			summaryText += &amp;#039;{{[[&amp;#039;;&lt;br /&gt;
			summaryText += tagName.indexOf(&amp;#039;:&amp;#039;) !== -1 ? tagName : &amp;#039;Template:&amp;#039; + tagName + &amp;#039;|&amp;#039; + tagName;&lt;br /&gt;
			summaryText += &amp;#039;]]}}&amp;#039;;&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// Check for preexisting tags and separate tags into groupable and non-groupable arrays&lt;br /&gt;
		for (i = 0; i &amp;lt; params.tags.length; i++) {&lt;br /&gt;
			tagRe = new RegExp(&amp;#039;(\\{\\{&amp;#039; + params.tags[i] + &amp;#039;(\\||\\}\\}))&amp;#039;, &amp;#039;im&amp;#039;);&lt;br /&gt;
			if (!tagRe.exec(pageText)) {&lt;br /&gt;
				tags = tags.concat(params.tags[i]);&lt;br /&gt;
			} else {&lt;br /&gt;
				Morebits.status.info(wgULS(&amp;#039;信息&amp;#039;, &amp;#039;資訊&amp;#039;), wgULS(&amp;#039;在页面上找到{{&amp;#039; + params.tags[i] +&lt;br /&gt;
					&amp;#039;}}…跳过&amp;#039;, &amp;#039;在頁面上找到{{&amp;#039; + params.tags[i] +&lt;br /&gt;
					&amp;#039;}}…跳過&amp;#039;));&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		tags = tags.concat(groupableTags);&lt;br /&gt;
&lt;br /&gt;
		tags.sort();&lt;br /&gt;
		totalTags = tags.length;&lt;br /&gt;
		$.each(tags, addTag);&lt;br /&gt;
&lt;br /&gt;
		summaryText += wgULS(&amp;#039;标记到&amp;#039;, &amp;#039;標記到&amp;#039;) + Twinkle.stub.mode;&lt;br /&gt;
&lt;br /&gt;
		pageobj.setPageText(pageText);&lt;br /&gt;
		pageobj.setEditSummary(summaryText);&lt;br /&gt;
		pageobj.setChangeTags(Twinkle.changeTags);&lt;br /&gt;
		pageobj.setWatchlist(Twinkle.getPref(&amp;#039;watchStubbedPages&amp;#039;));&lt;br /&gt;
		pageobj.setMinorEdit(Twinkle.getPref(&amp;#039;markStubbedPagesAsMinor&amp;#039;));&lt;br /&gt;
		pageobj.setCreateOption(&amp;#039;nocreate&amp;#039;);&lt;br /&gt;
		pageobj.save();&lt;br /&gt;
&lt;br /&gt;
		if (params.patrol) {&lt;br /&gt;
			pageobj.patrol();&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Twinkle.stub.callback.evaluate = function friendlytagCallbackEvaluate(e) {&lt;br /&gt;
	var form = e.target;&lt;br /&gt;
	var params = {};&lt;br /&gt;
	if (form.patrolPage) {&lt;br /&gt;
		params.patrol = form.patrolPage.checked;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	switch (Twinkle.stub.mode) {&lt;br /&gt;
		case &amp;#039;條目&amp;#039;:&lt;br /&gt;
		case &amp;#039;条目&amp;#039;:&lt;br /&gt;
			params.tags = form.getChecked(&amp;#039;articleTags&amp;#039;);&lt;br /&gt;
			params.group = false;&lt;br /&gt;
			break;&lt;br /&gt;
		default:&lt;br /&gt;
			alert(&amp;#039;Twinkle.stub：未知模式 &amp;#039; + Twinkle.stub.mode);&lt;br /&gt;
			break;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	if (!params.tags.length) {&lt;br /&gt;
		alert(wgULS(&amp;#039;必须选择至少一个标记！&amp;#039;, &amp;#039;必須選擇至少一個標記！&amp;#039;));&lt;br /&gt;
		return;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	Morebits.simpleWindow.setButtonsEnabled(false);&lt;br /&gt;
	Morebits.status.init(form);&lt;br /&gt;
&lt;br /&gt;
	Morebits.wiki.actionCompleted.redirect = mw.config.get(&amp;#039;wgPageName&amp;#039;);&lt;br /&gt;
	Morebits.wiki.actionCompleted.notice = wgULS(&amp;#039;标记完成，将在几秒内刷新页面&amp;#039;, &amp;#039;標記完成，將在幾秒內重新整理頁面&amp;#039;);&lt;br /&gt;
	if (Twinkle.stub.mode === &amp;#039;重定向&amp;#039;) {&lt;br /&gt;
		Morebits.wiki.actionCompleted.followRedirect = false;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	var wikipedia_page = new Morebits.wiki.page(mw.config.get(&amp;#039;wgPageName&amp;#039;), wgULS(&amp;#039;正在标记&amp;#039;, &amp;#039;正在標記&amp;#039;) + Twinkle.stub.mode);&lt;br /&gt;
	wikipedia_page.setCallbackParameters(params);&lt;br /&gt;
	switch (Twinkle.stub.mode) {&lt;br /&gt;
		case &amp;#039;條目&amp;#039;:&lt;br /&gt;
		case &amp;#039;条目&amp;#039;:&lt;br /&gt;
		/* falls through */&lt;br /&gt;
		case &amp;#039;重定向&amp;#039;:&lt;br /&gt;
			wikipedia_page.load(Twinkle.stub.callbacks.main);&lt;br /&gt;
			return;&lt;br /&gt;
		case &amp;#039;文件&amp;#039;:&lt;br /&gt;
		case &amp;#039;檔案&amp;#039;:&lt;br /&gt;
			wikipedia_page.load(Twinkle.stub.callbacks.file);&lt;br /&gt;
			break;&lt;br /&gt;
		default:&lt;br /&gt;
			alert(&amp;#039;Twinkle.stub：未知模式 &amp;#039; + Twinkle.stub.mode);&lt;br /&gt;
			break;&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Twinkle.addInitCallback(Twinkle.stub, &amp;#039;stub&amp;#039;);&lt;br /&gt;
})(jQuery);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>入我相思门</name></author>
	</entry>
</feed>