מדיה ויקי:CD-config.js – הבדלי גרסאות
תוכן שנמחק תוכן שנוסף
אין תקציר עריכה |
אין תקציר עריכה |
||
שורה 9:
(function () {
function unique(item, pos, arr) {
return arr.indexOf(item) === pos;
}
function getStrings() {
const
.filter(unique)
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'));▼
▲ 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')
return Promise.all(requests).catch(function () {});
▲ // We assume it's OK to fall back to English if the translation is unavailable for any
}▼
}
window.convenientDiscussions = window.convenientDiscussions || {};
if (convenientDiscussions.config) return;
שורה 123 ⟵ 124:
* Here, `''` is not a part of the signature.
*
* End the regexp with
*
* @type {RegExp}
* @default /(?:\s+>+)?(?:[·•\-–—―~/→⇒\s]|—|–|→|·| | )*\(?'*$/
*/
// signaturePrefixRegexp: /(?:\s+>+)?(?:[·•\-–—―~/→⇒\s]|—|–|→|·| | )*\(?'*$/,
שורה 132 ⟵ 133:
/**
* Unchangable text (usually user talk page link) at the end of Mediawiki:Signature (visible text,
* not wikitext). End the regexp with
*
* @type {?RegExp}
שורה 141 ⟵ 142:
tagName: 'דיונים נוחים',
* Script code name.
* https://www.mediawiki.org/wiki/Extension:Thanks#API_documentation}.
*
שורה 181 ⟵ 182:
// ],
paragraphTemplates: ['ש'],
שורה 189 ⟵ 190:
/**
* Blocks with classes listed here wont't be considered legit comment timestamp containers. They
* can still be parts of comments; for
* parts, see {@link module:defaultConfig.checkForCustomForeignComponents}.
* When it comes to the wikitext, all lines containing these classes are ignored.
*
* @type {string[]}
שורה 204 ⟵ 206:
* wikitext.
*
* @type {
* @default []
*/
שורה 211 ⟵ 213:
/**
* Regexps for strings that should be cut out of comment beginnings (not considered parts of
* them). This is in
*
*
* @type {RegExp[]}
שורה 249 ⟵ 250:
* correctly. You can also add the `cd-floating` class to such elements. You can also add the
* `cd-ignoreFloating` class to floating elements that never intersect comments but end up in
* `
*
* @type {string[]}
שורה 255 ⟵ 256:
*/
// customFloatingElementsSelectors: [],
/**▼
* Names of the closed discussion templates. They can be single templates like {@link
* https://en.wikipedia.org/wiki/Template:Closed} or pair templates like {@link
* https://ru.wikipedia.org/wiki/Template:Закрыто} / {@link
* https://ru.wikipedia.org/wiki/Template:Конец_закрытой_секции}. Include the closing part of the
* pair templates in the second array, and the rest of the templates in the first array. These
* templates are ignored when searching for a place to insert a comment in the wikitext.
* @type {Array.<Array.<string>>}
* @default <pre class="prettyprint source"><code>[
* [],
* [],
* ]</code></pre>
*/▼
// closedDiscussionTemplates: [
// [],
// [],
/**
שורה 262 ⟵ 282:
* @default []
*/
//
/**
שורה 318 ⟵ 338:
/**
*
* characters will need confirmation to be sent.
*
* @type {number}
שורה 327 ⟵ 347:
/**
*
*
* @type {number}
שורה 335 ⟵ 355:
/**
*
*
* @type {number}
שורה 343 ⟵ 363:
/**
* Regular expression matching the names of the pages where an sending empty comment shouldn't be
* confirmed (e.g., voting pages).
*
* @type {?RegExp}
שורה 362 ⟵ 382:
/**
*
*
* @typedef {object[]} Reaction
* @property {RegExp} pattern Pattern to match.
* @property {string} message Message displayed to the user.
* @property {string}
* @property {string} [type='notice'] For example, `notice`.
* @property {Function} [checkFunc] If the function returns false, no message is displayed.
שורה 389 ⟵ 408:
/**
* Load these modules on comment form creation
* object structure. If `checkFunc`
*
* @type {Module[]}
שורה 396 ⟵ 415:
*/
// customCommentFormModules: [],
▲ /**
▲ *
▲ */
/**
שורה 506 ⟵ 513:
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);
});
|