User:BlackShadowG/convenientDiscussions.js
外观
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google Chrome、Firefox、Microsoft Edge及Safari:按住⇧ 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 generator script and 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(function (lang) {
return 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': '1月',
'february-gen': '2月',
'march-gen': '3月',
'april-gen': '4月',
'may-gen': '5月',
'june-gen': '6月',
'july-gen': '7月',
'august-gen': '8月',
'september-gen': '9月',
'october-gen': '10月',
'november-gen': '11月',
'december-gen': '12月',
'parentheses': '($1)',
'parentheses-start': '(',
'parentheses-end': ')',
'word-separator': '',
'comma-separator': '、',
'colon-separator': ':',
'nextdiff': '下一版本→',
'timezone-utc': 'UTC',
'pagetitle': '$1 - 维基百科,自由的百科全书',
'discussiontools-topicsubscription-button-subscribe': '订阅',
'discussiontools-topicsubscription-button-subscribe-tooltip': '{{GENDER:|订阅}}以接收有关新留言的通知。',
'discussiontools-topicsubscription-button-unsubscribe': '取消订阅',
'discussiontools-topicsubscription-button-unsubscribe-tooltip': '{{GENDER:|取消订阅}}以停止接收有关新留言的通知。',
'discussiontools-topicsubscription-notify-subscribed-title': '{{GENDER:|您}}已订阅!',
'discussiontools-topicsubscription-notify-subscribed-body': '{{GENDER:|您}}会收到有关此话题内新留言的通知。',
'discussiontools-topicsubscription-notify-unsubscribed-title': '{{GENDER:|您}}已取消订阅。',
'discussiontools-topicsubscription-notify-unsubscribed-body': '您将不再收到“此话题下有新留言”的通知。',
'discussiontools-newtopicssubscription-button-subscribe-label': '订阅',
'discussiontools-newtopicssubscription-button-subscribe-tooltip': '订阅以在此页面上开始新话题时收到通知。',
'discussiontools-newtopicssubscription-button-unsubscribe-label': '取消订阅',
'discussiontools-newtopicssubscription-button-unsubscribe-tooltip': '取消订阅以停止在此页面上开始新话题时收到通知。',
'discussiontools-newtopicssubscription-notify-subscribed-title': '{{GENDER:|您}}已订阅!',
'discussiontools-newtopicssubscription-notify-subscribed-body': '{{GENDER:|您}}会在此页面上开始新话题时收到通知。',
'discussiontools-newtopicssubscription-notify-unsubscribed-title': '{{GENDER:|您}}已取消订阅。',
'discussiontools-newtopicssubscription-notify-unsubscribed-body': '{{GENDER:|您}}不再会在此页面上开始新话题时收到通知。',
'visualeditor-educationpopup-dismiss': '好的,明白了'
},
'specialPageAliases': {
'Contributions': '用户贡献',
'Diff': '差异',
'PermanentLink': '固定链接'
},
'substAliases': [
'替代:',
'替換:'
],
'timezone': 'UTC',
'unsignedTemplates': [
'Unsigned',
'补上签名',
'补充签名',
'未签名',
'签名',
'补签名',
'Nosign',
'Unsigned2'
],
'smallDivTemplates': [
'smalldiv'
],
'paragraphTemplates': [
'pb',
'Paragraph break',
'Parabr',
'Paragraph'
],
'outdentTemplates': [
'outdent',
'Od',
'反縮排',
'┌┘',
'Outdent1'
],
'clearTemplates': [
'Clear',
'Clr',
'Sectionbreak',
'Clear both',
'BrClear',
'強制換行'
],
quoteFormatting: function (isMultiline, author, timestamp, dtId) {
var pre = '';
var post = '';
if (isMultiline) {
pre = '{{Talk quote block|text=';
if (author) {
post += '|by=' + author;
}
if (timestamp) {
post += '|ts=' + timestamp;
}
if (dtId) {
post += '|id=' + dtId;
}
post += '}}';
} else {
pre = '{{tq|1='
post += '}}';
}
return [pre, post];
},
'noSignatureTemplates': [
'Moved discussion from',
'Moved discussion to',
'移動自',
'移动自',
'Movedfrom',
'Savedfrom',
'Archievedfrom',
'Movefrom',
'Savefrom',
'MOVEDFROM',
'Moved from',
'Switchfrom',
'移動至',
'Movedto',
'Moveto',
'移動到',
'已移動至',
'Moved to',
'移动至'
],
'closedDiscussionTemplates': [
[
'Closed',
'Discussion top',
'Archive top',
'Archive Top',
'ArchiveH',
'TalkendH',
'ConvertH',
'DelH',
'ConverH',
'Closereq',
'地球发动机/closereq',
'Delh',
'Talkendh',
'DELH'
],
[
'Archive bottom',
'Archive Bottom',
'Closed rfc bottom',
'ArchiveF'
]
],
'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>