User:D2F0F5/DisamAssist.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/* Original by [[User:Qwertyytrewqqwerty]] at [[w:en:User:Qwertyytrewqqwerty/DisamAssist.js]]&oldid=596553792 */
//<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',
'链接消歧义',
],
/*
* "Canonical names" of the templates that designate intentional links to
* disambiguation pages
*/
disamLinkIgnoreTemplates: [
'消歧義頁重定向',
],
/*
* Format string for "Foo (disambiguation)"-style pages
*/
disamFormat: '$1',
/*
* 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: '{{Disambiguation needed|date={{subst:#time:Y年F}}}}',
/*
* Content of the "Foo (disambiguation)" pages that will be created automatically when using
* DisamAssist from a "Foo" page
*/
redirectToDisam: '#REDIRECT [[$1]] {{消歧義頁重定向}}',
/*
* 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, 118],
/*
* 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: 200,
/*
* 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: 12,
/*
* 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: '处理歧义链接[[$1]]($2) ([[:en:User:Qwertyytrewqqwerty/DisamAssist|DisamAssist]])',
summaryChanged: '改链[[$1]]',
summaryOmitted: '跳过链接',
summaryRemoved: '移除链接',
summaryIntentional: '特意链向消歧义页',
summaryHelpNeeded: '请求协助',
summarySeparator: ';',
redirectSummary: '创建到[[$1]]的重定向 ([[:en:User:Qwertyytrewqqwerty/DisamAssist|DisamAssist]])',
}
}, 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>