User:Altt311/deletionmgt2.js

维基百科,自由的百科全书

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

if(/^Wikipedia:頁面存廢討論\//i.test(wgPageName) ||/^Wikipedia:檔案存廢討論\//i.test(wgPageName) ||/^Wikipedia:删除投票和请求\//i.test(wgPageName) || wgPageName == "Wikipedia:頁面恢復請求" || wgPageName == "Wikipedia:修订版本删除请求"){
	if ( typeof $j != 'undefined' && typeof $.fn.wikiEditor != 'undefined' ) {
		$( function() {
			$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
				'sections': {
					'delmgt': {
						'type': 'toolbar',
						'label': '刪除管理'
					}
				}
			} );
			$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
				'section': 'delmgt',
				'groups': {
					'afd': {
						'label': ''
					}
				}
			} );
			$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
				'section': 'delmgt',
				'group': 'afd',
				'tools': {
					'afdvote': {
						label: '刪除投票',
						type: 'select',
						list: {
							'Keep': {
								label: '保留',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{vk}\}',
										post: '—~~\~~\n'
									}
								}
							},
							'SpeedKeep': {
								label: '快速保留',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{vsk}\}',
										post: '—~~\~~\n'
									}
								}
							},
							'Delete': {
								label: '刪除',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{vd}\}',
										post: '—~~\~~\n'
									}
								}
							},
							'SpeedDelete': {
								label: '快速刪除',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{vsd}\}',
										post: '—~~\~~\n'
									}
								}
							},
							'Merge': {
								label: '合併',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{vm}\}',
										post: '—~~\~~\n'
									}
								}
							},
							'Move': {
								label: '移動',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{vmove}\}',
										post: '—~~\~~\n'
									}
								}
							},
							'Redirect': {
								label: '重定向',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{vr}\}到[[',
										periMsg: '條目',
										post: ']]—~~\~~\n'
									}
								}
							},
							'ToSource': {
								label: '移動到文庫',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{vms}\}',
										post: '—~~\~~\n'
									}
								}
							},
							'ToDict': {
								label: '移動到詞典',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{vmd}\}',
										post: '—~~\~~\n'
									}
								}
							},
							'ToBook': {
								label: '移動到教科書',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{vmb}\}',
										post: '—~~\~~\n'
									}
								}
							},
							'ToQuote': {
								label: '移動到語錄',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{vmq}\}',
										post: '—~~\~~\n'
									}
								}
							}
						}
					},
					'afdvotemgmt': {
						label: '投票管理',
						type: 'select',
						list: {
							'container': {
								label: '無效票框',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{\FollowLastIndent|#\|2=',
										post: '}\}'
									}
								}
							},
							'notQ': {
								label: '不合資格',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{Notqualifiedh}\}',
										post: '{\{Notqualifiedf}\}'
									}
								}
							},
							'noSign': {
								label: '無簽名',
									action: {
									type: 'encapsulate',
									options: {
										pre: '{\{Nosignh}\}',
										post: '{\{Nosignf}\}'
									}
								}
							},
							'dupe': {
								label: '重複票',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{voteduph}\}',
										post: '{\{votedupf}\}'
									}
								}
							},
							'otherReason': {
								label: '其他原因',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{votevoidh}\}',
										post: '{\{votevoidf|原因}\}'
									}
								}
							}
						}
					},
					'afdclose': {
						label: '投票完結',
						type: 'select',
						list: {
							'vfdDeleted': {
								label: '刪除',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|d}\}\n',
										post: '{\{subst:deleted}\}—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdKept': {
								label: '保留',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|k}\}\n',
										post: '{\{subst:kept}\}—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdSpeedlyDeleted': {
								label: '快速刪除',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|sd}\}\n',
										post: '{\{subst:SpeedyDeleted}\}—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdSpeedlyKept': {
								label: '快速保留',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|sk}\}\n',
										post: '----\n快速保留—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdMoved': {
								label: '移動',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|m}\}\n',
										post: '----\n已移動—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdLSSD': {
								label: '無來源版權',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|lssd}\}\n',
										post: '----\n無來源或版權—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdImageCopyvio': {
								label: '圖片侵權刪除',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|ic}\}\n',
										post: '----\n本圖片已確認侵權,刪除。—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdNoConsensus': {
								label: '討論無共識',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|nc}\}\n',
										post: '{\{subst:nc}\}—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdRedirected': {
								label: '條目重定向',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|r}\}\n',
										post: '----\n已重定向—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdCategoryRedirected': {
								label: '類別重定向',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|cr}\}\n',
										post: '----\n已重定向—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdNowCommons': {
								label: '已在共享提供',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|nowcommons}\}\n',
										post: '----\n已在共享資源提供,快速刪除—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdRequestInCommons': {
								label: '應在共享提請',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|commons}\}\n',
										post: '----此圖像於[[維基共享資源]],請至[[commons:COM:AFD|共享的刪除請求]]提出。—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdTransferToCopyvio': {
								label: '轉交侵權投票',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|c}\}\n',
										post: '{\{subst:(C)Problem}\}—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdIneffectualRequest': {
								label: '請求無效',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|ir}\}\n',
										post: '----\n請求無效。—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdReasonDisappear': {
								label: '請求理由消失',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|rr}\}\n',
										post: '----\n請求理由消失—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdRepeatRequest': {
								label: '重複請求',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|rep}\}\n',
										post: '----\n重複提出—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdSelfCancel': {
								label: '自行撤銷',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|提刪者撤回}\}\n',
										post: '----\n提刪者撤回—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdRepeatDeleted': {
								label: '鎖定條目',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|drep}\}\n',
										post: '----\n刪除+白紙保護—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdImageConvertedSVG': {
								label: '圖片已轉SVG',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|svg}\}\n',
										post: '----\n此圖片已轉成SVG,快速刪除—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdTransWN': {
								label: '移至新聞',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|twn}\}\n',
										post: '----\n已移動至維基新聞—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdTransWS': {
								label: '移至文庫',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|tws}\}\n',
										post: '----\n已移動至維基文庫—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdTransWB': {
								label: '移至教科書',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|twb}\}\n',
										post: '----\n已移動至維基教科書—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdTransWQ': {
								label: '移至語錄',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|twq}\}\n',
										post: '----\n已移動至維基語錄—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdTransWT': {
								label: '移至詞典',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|twt}\}\n',
										post: '----\n已移動至維基詞典—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdTransOther': {
								label: '移至其他計劃',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|two}\}\n',
										post: '----\n已移動至其他維基計劃—~~\~~\n{\{delf}\}'
									}
								}
							},
							'vfdOther': {
								label: '其他',
								action: {
									type: 'encapsulate',
									options: {
										pre: '{\{delh|請在此輸入處理結果}\}\n',
										post: '----\n請在此輸入處理結果—~~\~~\n{\{delf}\}'
									}
								}
							}
						}
					}
				}
			} );
		} );
	}
}