User:Sun8908/DisamAssist.js

出自維基百科,自由嘅百科全書
注意:儲存之後,你可能要兜過你嘅瀏覽器快取至睇到更改。Internet Explorer: 撳住Ctrl掣再撳重新整理掣。 Firefox: 撳住Shift掣再撳重新載入(又或者撳Ctrl-Shift-R)。 Google Chrome同埋Safari用戶就噉撳個重載掣。
// 來自[[:en:User:Qwertyytrewqqwerty/DisamAssist.js]],做緊本地化。
//<source lang="javascript">

window.DisamAssist = jQuery.extend( true, {
	cfg: {
		/*
		 * Categories where disambiguation pages are added (usually by a template like {{Disambiguation}}
		 */
		disamCategories: ['全部搞清楚版'],
		
		/*
		 * "Canonical names" of the templates that may appear after ambiguous links
		 * and which should be removed when fixing those links
		 */
		disamLinkTemplates: [
			'Disambiguation needed',
			'Ambiguous link',
			'Amblink',
			'Dab needed',
			'Disamb-link',
			'Disambig needed',
			'Disambiguate',
			'Dn',
			'Needdab'
		],
		
		/*
		 * "Canonical names" of the templates that designate intentional links to
		 * disambiguation pages
		 */
		disamLinkIgnoreTemplates: [
			'R from ambiguous page',
			'R to disambiguation page',
			'R from incomplete disambiguation'
		],
		
		/*
		 * Format string for "Foo (disambiguation)"-style pages
		 */
		 disamFormat: '',
		
		/*
		 * Regular expression matching the titles of disambiguation pages (when they are different from
		 * the titles of the primary topics)
		 */
		disamRegExp: '',
		
		/*
		 * Text that will be inserted after the link if the user requests help. If the value is null,
		 * the option to request help won't be offered
		 */
		disamNeededText: '', // 粵維冇{{dn}},所以暫時唔寫
		
		/*
		 * Content of the "Foo (disambiguation)" pages that will be created automatically when using
		 * DisamAssist from a "Foo" page
		 */
		redirectToDisam: '',
		
		/*
		 * Whether intentional links to disambiguation pages can be explicitly marked by adding " (disambiguation)"
		 */
		intentionalLinkOption: true,
		
		/*
		 * Namespaces that will be searched for incoming links to the disambiguation page (pages in other
		 * namespaces will be ignored)
		 */
		targetNamespaces: [0, 6, 10, 14, 100, 108],
		
		/*
		 * Number of backlinks that will be downloaded at once
		 * When using blredirect, the maximum limit is supposedly halved
		 * (see http://www.mediawiki.org/wiki/API:Backlinks)
		 */
		backlinkLimit: 250,
		
		/*
		 * Number of titles we can query for at once
		 */
		queryTitleLimit: 50,
	
		/*
		 * Number of characters before and after the incoming link that will be displayed
		 */
		radius: 300,
	
		/*
		 * Height of the context box, in lines
		 */
		numContextLines: 4,
	
		/*
		 * Number of pages that will be stored before saving, so that changes to them can be
		 * undone if need be
		 */
		historySize: 2,
		
		/*
		 * Minimum time in seconds since the last change was saved before a new edit can be made. A
		 * negative value or 0 disables the cooldown. Users with the "bot" right won't be affected by
		 * the cooldown
		 */
		editCooldown: 5,
		
		/*
		 * Specify how the watchlist is affected by DisamAssist edits. Possible values: "watch", "unwatch",
		 * "preferences", "nochange"
		 */
		watch: 'nochange'
	},

	txt: {
		start: 'Disambiguate links',
		startMain: 'Disambiguate links to primary topic',
		startSame: 'Disambiguate links to DAB',
		close: '關閉',
		undo: '復原',
		omit: '跳過',
		refresh: '刷新',
		titleAsText: '其他目標',
		disamNeeded: 'Tag {{dn}} ',
		intentionalLink: '特登連去搞清楚版嘅連結',
		titleAsTextPrompt: 'Specify the new target:',
		removeLink: '刪連結',
		optionMarker: ' [連嚟呢道]',
		targetOptionMarker: ' [Current target]',
		redirectOptionMarker: ' [Current target (redirected)]',
		pageTitleLine: 'In <a href="$1">$2</a>:',
		noMoreLinks: '已經冇晒要搞清楚嘅連結。',
		pendingEditCounter: '儲存緊:$1;喺紀錄上:$2',
		pendingEditBox: 'DisamAssist儲存緊修改($1)。',
		pendingEditBoxTimeEstimation: '$1; approximate time remaining: $2',
		pendingEditBoxLimited: 'Please don\'t close this tab until all pending changes have been saved. You may keep '
			+ 'editing Wikipedia in a different tab, but be advised that using multiple instances of DisamAssist at '
			+ 'the same time is discouraged, as a high number of edits over a short time period may be disruptive.',
		error: 'Error: $1',
		fetchRedirectsError: 'Unable to fetch redirects: "$1".',
		getBacklinksError: 'Unable to download backlinks: "$1".',
		fetchRightsError: 'Unable to fetch user rights: "$1",',
		loadPageError: 'Unable to load $1: "$2".',
		savePageError: 'Unable to save changes to $1: "$2".',
		dismissError: 'Dismiss',
		pending: 'DisamAssist重有啲未儲存嘅修改;如果要儲存,麻煩㩒「關閉」。',
		editInProgress: 'DisamAssist而家做緊修改;如果你而家關咗呢個頁面,嗰啲修改可能會唔見咗。',
		ellipsis: '...',
		notifyCharacter: '✔',
		summary: '用[[User:Sun8908/DisamAssist.js|DisamAssist]]搞清楚連去[[$1]]嘅連結($2)。',
		summaryChanged: '連結轉咗做[[$1]]',
		summaryOmitted: '跳過咗連結',
		summaryRemoved: '刪咗連結',
		summaryIntentional: '特登連去搞清楚版嘅連結',
		summaryHelpNeeded: '需要幫手',
		summarySeparator: '; ',
		redirectSummary: '用[[User:Sun8908/DisamAssist.js|DisamAssist]]開跳去[[$1]]嘅跳轉。'
	}
}, window.DisamAssist || {} );

mw.loader.load( '//es.wikipedia.org/w/index.php?title=Usuario:Qwertyytrewqqwerty/DisamAssist-core.js&action=raw&ctype=text/javascript' );
mw.loader.load( '//es.wikipedia.org/w/index.php?title=Usuario:Qwertyytrewqqwerty/DisamAssist.css&action=raw&ctype=text/css', 'text/css' );

//</source>