User:MintCandy/DisamAssist.js
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google Chrome、Firefox、Microsoft Edge及Safari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
//<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|date={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}',
/*
* 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: [6, 10, 14, 100, 108, 0],
/*
* 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: 0,
/*
* Specify how the watchlist is affected by DisamAssist edits. Possible values: "watch", "unwatch",
* "preferences", "nochange"
*/
watch: 'nochange'
},
txt: {
start: '给链接消歧义',
startMain: '更改链入',
startSame: '消歧义',
close: '关闭',
undo: '撤销',
omit: '跳过',
refresh: '重新加载',
titleAsText: '链接到其他页面',
disamNeeded: '{{需要消歧义}}',
intentionalLink: '故意保留为消歧义',
titleAsTextPrompt: '请指定链接目标:',
removeLink: '移除链接',
optionMarker: ' [链接至此]',
targetOptionMarker: ' [目前链接]',
redirectOptionMarker: ' [目前链接 (已重定向)]',
pageTitleLine: '在 <a href="$1">$2</a>:',
noMoreLinks: '没有更多链接需要消歧义了。',
pendingEditCounter: '正在保存: $1; 已保存: $2',
pendingEditBox: 'DisamAssist 正在保存更改($1).',
pendingEditBoxTimeEstimation: '$1; 剩余时间: 约$2',
pendingEditBoxLimited: '在所有更改保存完毕前,请不要关闭这个页面。你可以在其他窗口继续编辑,'
+ '但请避免同时运行多个DisamAssist,因为在短时间内进行大量编辑可能会造成干扰。',
error: '错误: $1',
fetchRedirectsError: '无法获取重定向: "$1".',
getBacklinksError: '无法获取反链: "$1".',
fetchRightsError: '无法获取用户权限: "$1",',
loadPageError: '无法加载$1: "$2".',
savePageError: '无法保存更改至$1: "$2".',
dismissError: '忽略',
pending: 'DisamAssist 中有未保存的更改。要保存这些更改,请按“关闭”。',
editInProgress: 'DisamAssist 当前正在执行更改。如果您现在关闭选项卡,可能会造成更改的丢失。',
ellipsis: '...',
notifyCharacter: '✔',
summary: '使用[[User:MintCandy/DisamAssist|DisamAssist]]处理消歧义链接[[$1]]($2)',
summaryChanged: '至[[$1]]',
summaryOmitted: '跳过链接',
summaryRemoved: '移除链接',
summaryIntentional: '故意链至消歧义',
summaryHelpNeeded: '需要帮助',
summarySeparator: '; ',
redirectSummary: '使用[[User:MintCandy/DisamAssist|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>