跳转到内容

User:ThirdThink/common.js

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

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

importScript('User:Xiplus/js/spihelper.js'); // Backlink: [[User:Xiplus/js/spihelper.js]]

importScript("User:Bluedeck/serve/blib-link.js");

importScript("user:bluedeck/serve/blib.js"); /*貢獻藍桌圖書館*/

importScript('MediaWiki:Gadget-HotCat.js');

mw.loader.load(['ext.gadget.Twinkle']);

importScript("User:Bluedeck/serve/edit-conflict.js"); /*實時編輯衝突提示*/

importScript("User:Bluedeck/serve/ar-auto-h.js"); /*已刪除內容查詢插件*/

importScript('User:Chiefwei/rater/rater-t.js'); // [[User:Chiefwei/rater]],作者:[[:en:User:Kephir/gadgets/rater]]

importScript( 'User:小躍/Vote-Template/Vote.js' )

mw.loader.load( "https://meta.wikimedia.org/w/index.php?title=User:Zhaofeng_Li/Reflinks.js&action=raw&ctype=text/javascript" );

/*
 * 半自动提报RRD,新人作。
 * 加载后会在页面历史的“比较被选版本”按钮旁边添加一个“请求删除被选版本”按钮,
 ** 用复选框(不是看差异用的单选框)选中全部要提报的版本后单击按钮填上理由和要隐藏的项目就行。
 * 其实那些复选框本来是编辑标签用的,不过既然注册用户都可以编辑标签,干脆就用它了。
 *
 * 当前版本
 ** 0.1
 * 更新日志
 ** 2017-04-04 v0.1 支持了繁体,修了个bug,加了些todo,重构了代码。
 *
 * TODO
 ** 发现对应标题已被提报时,询问用户是否追加。
 ** 忽略已被隐藏的版本。
 ** 可考虑支持单选框,提报选中的两个版本之间的所有东西。
 ** 代码显然亟待好好重构一番。
 *
 * 吐槽、反馈bug
 * 在[[User talk:WhitePhosphorus/js/rrd.js]]与[[User talk:WhitePhosphorus]]都可以。
 */

function get(obj, attr, defret) {
	return obj.hasAttribute(attr) ? obj.getAttribute(attr) : defret;
}

mw.loader.using(['jquery.ui', 'mediawiki.util'], function() {
	var RRDPage = 'Wikipedia:修订版本删除请求',
		ids = [],
		dl = null,
		config = {'checkboxes': {}, 'others': {}},
		msg;

	function loadIDs() {
		boxes = document.getElementsByTagName("input");
		for (i = 0; i < boxes.length; ++i) {
			if (get(boxes[i], "type") === "checkbox" && boxes[i].checked) {
				var idRe = /ids\[(\d+)\]/,
					idArr = idRe.exec(get(boxes[i], "name", ""));
				if (idArr !== null)
					ids.push(idArr[1]);
			}
		}
	}

	function submit(toHide, reason, otherReasons) {
		var rrdArr = [
			'{{Revdel',
			'|status = ',
			'|article = ' + mw.config.get('wgPageName'),
			'|set = ' + toHide,
			'|reason = ' + reason + otherReasons
		];
		for (i = 0; i < ids.length; ++i)
			rrdArr.push('|id' + (i+1) + ' = ' + ids[i]);
		rrdArr.push('}}\n--~~'+'~~');

		$.ajax({
			url: mw.util.wikiScript('api'),
			data: {
				action: 'query',
				prop: 'revisions',
				titles: RRDPage,
				rvprop: 'content',
				format: 'json'
			}
		}).done(function(data) {
			var content = null;
			if (data.query) {
				if (data.query.pages) {
					for (var id in data.query.pages) {
						if (data.query.pages[id]) {
							var page = data.query.pages[id];
							if (page.revisions && page.revisions.length) {
								if (page.revisions[0]['*']) {
									content = page.revisions[0]['*'];
								}
							}
						}
					}
				}
			}
			if (content !== null) {
				$.ajax({
					url: mw.util.wikiScript('api'),
					dataType: 'json',
					type: 'POST',
					data: {
						action: 'edit',
						title: RRDPage,
						summary: msg.edit_summary,
						text: content + '\n\n' + rrdArr.join("\n"),
						token: mw.user.tokens.get('csrfToken'),
						format: 'json'
					}
				}).done(function(data) {
					if (data && data.edit && data.edit.result === 'Success') {
						window.location = mw.config.get('wgServer') + mw.config.get('wgArticlePath').replace('$1', RRDPage);
					} else {
						alert('Some errors occured while saving page: ' + data.error.code ? data.error.code : 'unknown');
					}
				}).fail(function(jqXHR, textStatus, errorThrown) {
					console.log('Error when editing page ' + RRDPage + ': ' + errorThrown);
				});
			} else {
				console.log('Error when loading page ' + RRDPage + ': missing');
			}
		}).fail(function(jqXHR, textStatus, errorThrown) {
			console.log('Error when loading page ' + RRDPage + ': ' + errorThrown);
		});
	}

	function updateConfig() {
		if ($('#rrdHideContent').prop("checked")) config.checkboxes.rrdHideContent = 1;
		if ($('#rrdHideUsername').prop("checked")) config.checkboxes.rrdHideUsername = 1;
		if ($('#rrdHideSummary').prop("checked")) config.checkboxes.rrdHideSummary = 1;
		config.others.rrdReason = $('#rrdReason').val();
		config.others.rrdOtherReasons = $('#rrdOtherReasons').val();
	}

	function loadConfig() {
		for (var k in config.others)
			if (config.others.hasOwnProperty(k))
				$('#' + k).val(config.others[k]);
		for (k in config.checkboxes)
			$('#' + k).prop('checked', config.checkboxes.hasOwnProperty(k));
	}

	function showWindow() {
		loadIDs();
		if (ids.length === 0) {
			alert(msg.err_no_revision_provided);
			return null;
		}
		var html =
			'<div id="rrdConfig">' +
			msg.hide_items + '<br />' +
			'<div style="float:left;padding:0 5px;">' +
			'<input name="content" id="rrdHideContent" type="checkbox" value="content" checked>' +
			'<label for="rrdHideContent" id="rrd-content">' + msg.hide_content + '</label>' +
			'</div><div style="float:left;padding:0 5px;">' +
			'<input name="username" id="rrdHideUsername" type="checkbox" value="username">' +
			'<label for="rrdHideUsername" id="rrd-username">' + msg.hide_username + '</label>' +
			'</div><div style="float:left;padding:0 5px;">' +
			'<input name="summary" id="rrdHideSummary" type="checkbox" value="summary">' +
			'<label for="rrdHideSummary" id="rrd-summary">' + msg.hide_summary + '</label>' +
			'</div><br /><br />' +
			msg.hide_reason + '<br />' +
			'<select name="rrdReason" id="rrdReason">' +
			'<option value=' + msg.hide_reason_rd1 + '>' + 'RD1:' + msg.hide_reason_rd1 + '</option>' +
			'<option value=' + msg.hide_reason_rd2 + '>' + 'RD2:' + msg.hide_reason_rd2 + '</option>' +
			'<option value=' + msg.hide_reason_rd3 + '>' + 'RD3:' + msg.hide_reason_rd3 + '</option>' +
			'<option value=' + msg.hide_reason_rd4 + '>' + 'RD4:' + msg.hide_reason_rd4 + '</option>' +
			'<option value=' + msg.hide_reason_rd5 + '>' + 'RD5:' + msg.hide_reason_rd5 + '</option>' +
			'<option value=' + msg.hide_reason_rd6 + '>' + 'RD6:' + msg.hide_reason_rd6 + '</option>' +
			'<option value="">' + msg.hide_reason_other + '</option>' +
			'</select>' +
			'<br /><br />' +
			msg.other_reasons + '<br />' +
			'<textarea name="otherReasons" id="rrdOtherReasons" rows=4></textarea>' +
			'</div>';
		if (dl) {
			dl.html(html).dialog("open");
			loadConfig();
			return null;
		}
		dl = $(html).dialog({
			title: msg.dialog_title,
			minWidth: 515,
			minHeight: 150,
			close: updateConfig,
			buttons: [
				{
					text: msg.dialog_button_submit,
					click: function() {
						$(this).dialog('close');
						var reason = config.others.rrdReason;
						var otherReasons = config.others.rrdOtherReasons;
						if (otherReasons && reason) otherReasons = ',' + otherReasons;
						var toHide = [];
						if (config.checkboxes.hasOwnProperty('rrdHideContent'))
							toHide.push(msg.hide_content);
						if (config.checkboxes.hasOwnProperty('rrdHideUsername'))
							toHide.push(msg.hide_username);
						if (config.checkboxes.hasOwnProperty('rrdHideSummary'))
							toHide.push(msg.hide_summary);
						var cont = true;
						if (toHide.length === 0) {
							alert(msg.err_no_item_provided);
							return null;
						}
						if (!reason && !otherReasons)
							cont = confirm(msg.warn_no_reason_provided);
						if (cont)
							submit(toHide.join('、'), reason, otherReasons);
					}
				},
				{
					text: msg.dialog_button_cancel,
					click: function() { $(this).dialog('close'); }
				}
			]
		});
	}

	function main() {
		var $report = $('<button />', {
			'name': 'reportRRD',
			'type': 'button',
			'title': msg.report_button_title + RRDPage,
			'text': msg.report_button_text
		});
		$report.on('click', showWindow);
		$(".historysubmit.mw-history-compareselectedversions-button").after($report);
	}

	function init() {
		loadMessages();
		if (mw.config.get('wgAction') === "history")
			main();
	}

	$(document).ready(init);
	
	function loadMessages() {
		switch (mw.config.get('wgUserLanguage')) {
			case 'zh-cn':
			case 'zh-hans':
			case 'zh-my':
			case 'zh-sg':
				msg = {
					edit_summary: '[[User:WhitePhosphorus/js/rrd.js|半自动提报]]修订版本删除',
					err_no_revision_provided: '您没有选择需隐藏的版本!',
					err_no_item_provided: '您没有选择需隐藏的项目!',
					warn_no_reason_provided: '您没有输入任何理由!确定要继续吗?',
					hide_items: '需隐藏的项目:',
					hide_content: '编辑内容',
					hide_username: '编辑者用户名/IP地址',
					hide_summary: '编辑摘要',
					hide_reason: '理据:',
					hide_reason_rd1: '侵犯版权',
					hide_reason_rd2: '针对个人、团体或组织的严重侮辱、贬低或攻击性材料',
					hide_reason_rd3: '扰乱性内容',
					hide_reason_rd4: '非公开的私人信息',
					hide_reason_rd5: '删除守则里的有效删除,使用修订版本删除执行',
					hide_reason_rd6: '版本删除矫正',
					hide_reason_other: '仅使用下方的附加理由',
					other_reasons: '附加理由(可选,不用签名)',
					dialog_title: '提报修订版本删除',
					dialog_button_submit: '提报',
					dialog_button_cancel: '取消',
					report_button_title: '将选中的版本提报到',
					report_button_text: '请求删除被选版本'
				};
				break;
			default:
				msg = {
					edit_summary: '[[User:WhitePhosphorus/js/rrd.js|半自動提報]]修訂版本刪除',
					err_no_revision_provided: '您沒有選擇需隱藏的版本!',
					err_no_item_provided: '您沒有選擇需隱藏的項目!',
					warn_no_reason_provided: '您沒有輸入任何理由!確定要繼續嗎?',
					hide_items: '需隱藏的項目:',
					hide_content: '編輯內容',
					hide_username: '編輯者用戶名/IP位址',
					hide_summary: '編輯摘要',
					hide_reason: '理據:',
					hide_reason_rd1: '侵犯版權',
					hide_reason_rd2: '針對個人、團體或組織的嚴重侮辱、貶低或攻擊性材料',
					hide_reason_rd3: '擾亂性內容',
					hide_reason_rd4: '非公開的私人信息',
					hide_reason_rd5: '刪除守則下的有效刪除,使用修訂版本刪除執行',
					hide_reason_rd6: '版本刪除校正',
					hide_reason_other: '僅使用下方的附加理由',
					other_reasons: '附加理由(可選,不用簽名)',
					dialog_title: '提報修訂版本刪除',
					dialog_button_submit: '提報',
					dialog_button_cancel: '取消',
					report_button_title: '將選中的版本提報到',
					report_button_text: '請求刪除被選版本'
				};
		}
	}
});

importScript('User:PhiLiP/wikicache/load.js');

importScript('User:Vozhuo/Tool/MOSNUM dates.js');

importScript('MediaWiki:Gadget-CommentsinLocalTime.js');

importScript("User:94rain/js/Gadget-afchelper.js");

mw.loader.load('https://wikiplus-app.com/Main.js');
localStorage.Wikiplus_Settings = '{"defaultSummary": "Use [[zh:User:镜音铃/Wikiplus|W+]] to edit"}';

importScript("User:Ericliu1912/shortURL.js");

mw.loader.load('https://wikiplus-app.com/Main.js');
localStorage.Wikiplus_Settings = '{"defaultSummary": "Use [[zh:User:镜音铃/Wikiplus|W+]] to edit"}';

importScript("user:bluedeck/serve/blib-inverse.js"); /* 藍桌圖書館獲取源碼 */

// <nowiki>
/* globals CloseVip:true */
(function() {

    if (typeof CloseVip == 'undefined')
        CloseVip = {};

    if (typeof CloseVip.summary == 'undefined') {
        CloseVip.summary = '關閉報告 via [[User:Xiplus/js/close-vip.js|close-vip]]';
    }

    if (mw.config.get('wgPageName') !== 'Wikipedia:当前的破坏'
        || mw.config.get('wgAction') !== 'view'
        || mw.config.get('wgRevisionId') !== mw.config.get('wgCurRevisionId')) {
        return;
    }

    var getPageContent = new Promise(function(resolve, reject) {
        new mw.Api().get({
            action: 'query',
            prop: 'revisions',
            rvprop: ['content', 'timestamp'],
            titles: 'Wikipedia:当前的破坏',
            formatversion: '2',
            curtimestamp: true
        }).then(function(data) {
            var page, revision;
            if (!data.query || !data.query.pages) {
                mw.notify('未能抓取頁面內容(unknown)');
                reject('unknown');
            }
            page = data.query.pages[0];
            if (!page || page.invalid) {
                mw.notify('未能抓取頁面內容(invalidtitle)');
                reject('invalidtitle');
            }
            if (page.missing) {
                mw.notify('未能抓取頁面內容(nocreate-missing)');
                reject('nocreate-missing');
            }
            revision = page.revisions[0];
            var content = revision.content;
            var basetimestamp = revision.timestamp;
            var curtimestamp = data.curtimestamp;
            resolve({
                content: content,
                basetimestamp: basetimestamp,
                curtimestamp: curtimestamp
            });
        })
    }
    );

    function showCloseButton() {
        var titles = $('#bodyContent').find('h3');

        var spanTag = function(color, content) {
            var span = document.createElement('span');
            span.style.color = color;
            span.appendChild(document.createTextNode(content));
            return span;
        };
        var delNode = document.createElement('strong');
        var delLink = document.createElement('a');
        delLink.appendChild(spanTag('Black', '['));
        delLink.appendChild(spanTag('Red', wgULS('关闭', '關閉')));
        delLink.appendChild(spanTag('Black', ']'));
        delNode.setAttribute('class', 'CloseVipBtn');
        delNode.appendChild(delLink);

        titles.each(function(key, current) {
            if (key == 0) {
                return;
            }
            var node = current.getElementsByClassName('mw-headline')[0];
            var title = $(current).find('.mw-headline').children()[0].id;
            title = title.replace(/{{vandal\|(.*?)}}/, '$1');

            var tmpNode = delNode.cloneNode(true);
            $(tmpNode.firstChild).click(function() {
                processClose(key, title);
                return false;
            });
            node.appendChild(tmpNode)
        });
    }

    function processClose(key, title) {
        mw.loader.using(['jquery.ui'], function() {
            var html = '<div>';
            html += '{{VIP}}<br>';
            html += '<select id="vip" onchange="$(this.parentElement).find(\'#comment\')[0].value += this.value; this.value = \'\';">';
            html += '<option value="">選擇</option>';
            html += '<option value="{{VIP|chk}}">檢查中</option>';
            html += '<option value="{{VIP|m}}">將關注此用戶</option>';
            html += '<option value="{{VIP|w}}">用戶已獲警告</option>';
            html += '<option value="{{VIP|i}}">近期編輯未足以用於判斷是否封禁用戶</option>';
            html += '<option value="{{VIP|f}}">最後警告後無編輯。如用戶繼續進行破壞,請回報</option>';
            html += '<option value="{{VIP|nesw}}">警告後無編輯。如用戶在獲充分警告後繼續進行破壞,請回報</option>';
            html += '<option value="{{VIP|4im}}">最近警告不當,4im層級僅適用於嚴重破壞</option>';
            html += '<option value="{{VIP|ns}}">未獲充分警告。如用戶已獲充分警告並繼續進行破壞,請回報</option>';
            html += '<option value="{{VIP|dc}}">拒絕</option>';
            html += '<option value="{{VIP|nv}}">編輯並非破壞。請確保其最近編輯構成破壞後再重新提報</option>';
            html += '<option value="{{VIP|b}}">拒絕,實際情況可能並非如此(機器人)</option>';
            html += '<option value="{{VIP|fp}}">錯誤提報,編輯並非破壞(機器人)</option>';
            html += '<option value="{{VIP|c}}">編輯爭議。請考慮解決爭議,或提報至EWIP</option>';
            html += '<option value="{{VIP|np}}">封禁乃用以預防破壞而非懲罰</option>';
            html += '<option value="{{VIP|p}}">已保護頁面</option>';
            html += '<option value="{{VIP|d}}">已刪除頁面</option>';
            html += '<option value="{{VIP|n}}">注意</option>';
            html += '<option value="{{VIP|s}}">疑似共享IP,由多人共用</option>';
            html += '<option value="{{VIP|in}}">注意:IP位址不適宜實施永久封禁,請參閱封禁方針</option>';
            html += '<option value="{{VIP|ew}}">此頁僅處理破壞,請轉此處提報編輯戰</option>';
            html += '<option value="{{VIP|a}}">此頁僅處理破壞,請轉此處提報爭議</option>';
            html += '<option value="{{VIP|u}}">此頁僅處理破壞,請轉此處提報不當用戶名</option>';
            html += '<option value="{{VIP|r}}">此頁僅處理破壞,請轉此處提報保護頁面</option>';
            html += '<option value="{{VIP|sp}}">此頁僅處理破壞,請轉此處提報用戶核查</option>';
            html += '<option value="{{VIP|e|X}}">陳舊報告,用戶已停止編輯/用戶近期已沒有編輯X</option>';
            html += '<option value="{{VIP|sn|X}}">報告即時但現已陳舊,用戶最後破壞距今已有X。如用戶再次進行破壞,請回報</option>';
            html += '<option value="{{VIP|ow|Y}}">陳舊警告,最近警告於Y以前發出</option>';
            html += '<option value="{{VIP|q}}">問題</option>';
            html += '</select><br>';
            html += '{{Block}}<br>';
            html += '<select id="block" onchange="$(this.parentElement).find(\'#comment\')[0].value += this.value; this.value = \'\';">';
            html += '<option value="">選擇</option>';
            html += '<option value="{{Blocked|1天}}">1天</option>';
            html += '<option value="{{Blocked|1週}}">1週</option>';
            html += '<option value="{{Blocked|1個月}}">1個月</option>';
            html += '<option value="{{Blocked|1年}}">1年</option>';
            html += '<option value="{{Blocked|indef}}">不限期封禁</option>';
            html += '<option value="{{Blocked|ad=Example|1年}}">已由管理員Example執行封禁1年</option>';
            html += '</select><br>';
            html += '留言<br>';
            html += '<input type="text" id="comment" size="40">';
            html += '</div>';
            $(html).dialog({
                title: '關閉報告 - ' + title,
                minWidth: 515,
                minHeight: 150,
                buttons: [{
                    text: '確定',
                    click: function() {
                        if ($(this).find('#comment').val().trim() !== '') {
                            processEdit(key, title, $(this).find('#comment').val());
                        } else {
                            mw.notify('動作已取消');
                        }
                        $(this).dialog('close');
                    }
                }, {
                    text: '取消',
                    click: function() {
                        $(this).dialog('close');
                    }
                }]
            });
        });
    }

    function processEdit(key, title, comment) {
        new mw.Api().edit('Wikipedia:当前的破坏', function(revision) {
            var content = revision.content;
            const splittoken = 'CLOSE_SPLIT_TOKEN';
            content = content.replace(/^===/gm, splittoken + '===');
            var contents = content.split(splittoken);
            contents[key] = contents[key].trim();
            comment = comment.trim();
            if (comment !== '') {
                if (comment.search(/[.?!;。?!;]$/) === -1) {
                    comment += '。';
                }
                if (contents[key].match(/^\*\s*处理:[ \t]*(<!-- 非管理員僅可標記已執行的封禁,針對提報的意見請放在下一行 -->)?[ \t]*$/m)) {
                    contents[key] = contents[key].replace(/^(\*\s*处理:)[ \t]*(<!-- 非管理員僅可標記已執行的封禁,針對提報的意見請放在下一行 -->)?[ \t]*$/m, '$1' + comment + '--~~~~');

                } else {
                    contents[key] += '\n* 处理:' + comment + '--~~~~';
                }
            }
            contents[key] += '\n\n';
            content = contents.join("");
            $($('#bodyContent').find('h3')[key - 1]).find('.CloseVipBtn span').css('color', 'grey');
            return {
                text: content,
                basetimestamp: revision.timestamp,
                summary: CloseVip.summary,
                minor: true
            };
        }).then(function() {
            mw.notify('已關閉 ' + title);
        }, function(e) {
            if (e == 'editconflict') {
                mw.notify('關閉 ' + title + ' 時發生編輯衝突');
            } else {
                mw.notify('關閉 ' + title + ' 時發生未知錯誤:' + e);
            }
        });
    }

    getPageContent.then(function(result) {
        window.content = result.content;
        var lenintext = result.content.split(/^===/gm).length - 1;
        var leninhtml = $('#bodyContent').find('h3').length - 1;
        if (leninhtml !== lenintext) {
            mw.notify('抓取章節錯誤,在HTML找到 ' + leninhtml + ' 個章節,在原始碼找到 ' + lenintext + ' 個章節');
        } else {
            showCloseButton();
        }
    });

}
)();
// </nowiki>

importScript("User:和平奮鬥救地球/link-ts.js");

//<source lang="javascript">

//DisamAssist
//由[[User:Qwertyytrewqqwerty]]最初設計:[[es:Usuario:Qwertyytrewqqwerty/DisamAssist.js]]
//由[[User:GZWDer]]本地化:[[User:GZWDer/DisamAssist.js]] 2020-08-19
//由[[User:和平奮鬥救地球]] 稍作翻譯 2021-05-15
//預定之後再慢慢翻

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: 'Disambiguate links',
		startMain: 'Disambiguate links to primary topic',
		startSame: 'Disambiguate links to DAB',
		close: '關閉',
		undo: '復原',
		omit: '跳過',
		refresh: '重新整理',
		titleAsText: '其他目標',
		disamNeeded: '標示{{dn}}',
		intentionalLink: '有意連到消歧義頁的連結',
		titleAsTextPrompt: '請輸入新的連結目標:',
		removeLink: '去除連結',
		optionMarker: ' [連到這裡]',
		targetOptionMarker: ' [Current target]',
		redirectOptionMarker: ' [Current target (redirected)]',
		pageTitleLine: 'In <a href="$1">$2</a>:',
		noMoreLinks: '沒有需要消歧義的連結了。',
		pendingEditCounter: 'Saving: $1; in history: $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:和平奮鬥救地球/DisamAssist.js|DisamAssist]]清理[[WP:DAB|消歧義]]連結:[[$1]]($2)。',
		summaryChanged: '改連結至[[$1]]',
		summaryOmitted: '連結已跳過',
		summaryRemoved: '連結已移除',
		summaryIntentional: '刻意連至消歧義頁面',
		summaryHelpNeeded: '需要幫助',
		summarySeparator: '; ',
		redirectSummary: '使用[[User:和平奮鬥救地球/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>