User:-akko/convenientDiscussions.js

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

/**
 * This configuration might get outdated as the script evolves, so it's best to keep it up to date
 * by checking for the documentation updates from time to time. See the documentation at
 * https://commons.wikimedia.org/wiki/Special:MyLanguage/User:Jack_who_built_the_house/Convenient_Discussions#Configuring_for_a_wiki.
 */
// <nowiki>
(function () {
function unique(item, i, arr) {
  return arr.indexOf(item) === i;
}
function getStrings() {
  const requests = [mw.config.get('wgUserLanguage'), mw.config.get('wgContentLanguage')]
    .filter(unique)
    .filter(function (lang) {
      return lang !== 'en';
    })
    .map((lang) => mw.loader.getScript('https://commons.wikimedia.org/w/index.php?title=User:Jack_who_built_the_house/convenientDiscussions-i18n/' + lang + '.js&action=raw&ctype=text/javascript'));
  // We assume it's OK to fall back to English if the translation is unavailable for any reason.
  return Promise.all(requests).catch(function () {});
}
window.convenientDiscussions = window.convenientDiscussions || {};
if (convenientDiscussions.config) return;
/* BEGINNING OF THE CONFIGURATION */
convenientDiscussions.config = {
	'messages': {
		'sun': '日',
		'mon': '一',
		'tue': '二',
		'wed': '三',
		'thu': '四',
		'fri': '五',
		'sat': '六',
		'sunday': '星期日',
		'monday': '星期一',
		'tuesday': '星期二',
		'wednesday': '星期三',
		'thursday': '星期四',
		'friday': '星期五',
		'saturday': '星期六',
		'jan': '1月',
		'feb': '2月',
		'mar': '3月',
		'apr': '4月',
		'may': '5月',
		'jun': '6月',
		'jul': '7月',
		'aug': '8月',
		'sep': '9月',
		'oct': '10月',
		'nov': '11月',
		'dec': '12月',
		'january': '1月',
		'february': '2月',
		'march': '3月',
		'april': '4月',
		'may_long': '5月',
		'june': '6月',
		'july': '7月',
		'august': '8月',
		'september': '9月',
		'october': '10月',
		'november': '11月',
		'december': '12月',
		'january-gen': '一月',
		'february-gen': '二月',
		'march-gen': '三月',
		'april-gen': '四月',
		'may-gen': '五月',
		'june-gen': '六月',
		'july-gen': '七月',
		'august-gen': '八月',
		'september-gen': '九月',
		'october-gen': '十月',
		'november-gen': '十一月',
		'december-gen': '十二月',
		'parentheses': '($1)',
		'parentheses-start': '(',
		'parentheses-end': ')',
		'word-separator': '',
		'comma-separator': '、',
		'colon-separator': ':',
		'signature': '[[{{ns:user}}:$1|$2]]([[{{#ifeq:{{FULLPAGENAME}}|{{ns:3}}:$1|{{ns:user_talk}}:$1#top|{{ns:user_talk}}:$1}}|留言]])',
		'timezone-utc': 'UTC'
	},
	'contribsPage': 'Special:用户贡献',
	'localTimezoneOffset': 0,
	'unsignedTemplates': [
		'Unsigned',
		'补上签名',
		'补充签名',
		'未签名',
		'签名',
		'补签名'
	],
	'paragraphTemplates': [
		'Paragraph break',
		'Pb',
		'Parabr',
		'Paragraph'
	],
	'smallDivTemplate': 'Smalldiv',
	'templatesToExclude': [
		'移動自',
		'Movedfrom',
		'Savedfrom',
		'Archievedfrom',
		'Movefrom',
		'Savefrom',
		'MOVEDFROM',
		'Moved from',
		'Switchfrom',
		'移動至',
		'Movedto',
		'Switchto',
		'Moveto',
		'移動到',
		'已移動至',
		'Moved to',
		'移动至'
	],
	'closedDiscussionTemplates': [
		[
			'Closed'
		],
		[]
	],
	'signatureEndingRegexp': /(留言)/
};
/* END OF THE CONFIGURATION */
if (!convenientDiscussions.isRunning) {
  convenientDiscussions.getStringsPromise = getStrings();
  mw.loader.getScript('https://commons.wikimedia.org/w/index.php?title=User:Jack_who_built_the_house/convenientDiscussions.js&action=raw&ctype=text/javascript')
    .catch(function (e) {
      console.warn('Couldn\'t load Convenient Discussions.', e);
    });
}
}());
// </nowiki>