MediaWiki:Gadget-TwinkleV3.js
Catatan: Setelah menyimpan, Anda harus memintas tembolok (cache) peramban Anda untuk melihat perubahannya. Google Chrome, Firefox, Microsoft Edge dan Safari: Tahan tombol ⇧ Shift dan klik Muat ulang (Reload) di tombol bilah alat. Untuk detail dan instruksi tentang peramban lain, lihat halaman menghapus singgahan (Inggris).
/* _______________________________________________________________________________
* | |
* | === WARNING: GLOBAL GADGET FILE === |
* | Changes to this page affect many users. |
* | Please discuss changes on the talk page or on [[WT:Gadget]] before editing. |
* |_______________________________________________________________________________|
*
* Built from source code at GitHub repository [https://github.com/kenrick95/twinkle-idwiki]
* All changes should be made in the repository. Please do not attempt to edit this file directly.
*/
/* <nowiki> */
(function () {
var e = {
795: function (e) {
function _inheritsLoose(e, n) {
e.prototype = Object.create(n.prototype);
e.prototype.constructor = e;
_setPrototypeOf(e, n);
}
function _setPrototypeOf(e, n) {
_setPrototypeOf =
Object.setPrototypeOf ||
function _setPrototypeOf(e, n) {
e.__proto__ = n;
return e;
};
return _setPrototypeOf(e, n);
}
!(function (n, r) {
true ? (e.exports = r()) : 0;
})(this, function () {
'use strict';
var e = (function () {
function u(e) {
this.locale = e;
}
var e = u.prototype;
e.convertPlural = function convertPlural(e, n) {
var r = new RegExp('\\d+=', 'i');
if (!n || 0 === n.length) {
return '';
}
for (var s = 0; s < n.length; s++) {
var d = n[s];
if (r.test(d)) {
if (parseInt(d.slice(0, d.indexOf('=')), 10) === e) {
return d.slice(d.indexOf('=') + 1);
}
n[s] = void 0;
}
}
n = n.filter(function (e) {
return !!e;
});
var p = u.pluralRules[this.locale];
p || (p = { one: 'i = 1 and v = 0' });
var g = this.getPluralForm(e, p);
return (g = Math.min(g, n.length - 1)), n[g];
};
e.getPluralForm = function getPluralForm(e, n) {
var r = ['zero', 'one', 'two', 'few', 'many', 'other'];
var s = 0;
var d = mw.libs.pluralRuleParser;
for (var p = 0; p < r.length; p++) {
if (n[r[p]]) {
if (d(n[r[p]], e)) {
return s;
}
s++;
}
}
return s;
};
e.convertNumber = function convertNumber(e, n) {
var r = this.digitTransformTable(this.locale),
s = String(e),
d = '';
if (!r) {
return e;
}
if (n) {
if (parseFloat(e, 10) === e) {
return e;
}
var p = [];
for (var g in r) {
p[r[g]] = g;
}
r = p;
}
for (var m = 0; m < s.length; m++) {
r[s[m]] ? (d += r[s[m]]) : (d += s[m]);
}
return n ? parseFloat(d, 10) : d;
};
e.convertGrammar = function convertGrammar(e, n) {
return e;
};
e.gender = function gender(e, n) {
if (!n || 0 === n.length) {
return '';
}
for (; n.length < 2; ) {
n.push(n[n.length - 1]);
}
return 'male' === e
? n[0]
: 'female' === e
? n[1]
: 3 === n.length
? n[2]
: n[0];
};
e.digitTransformTable = function digitTransformTable(e) {
return !!u.digitTransforms[e] && u.digitTransforms[e].split('');
};
return u;
})();
(e.pluralRules = {}), (e.digitTransforms = {});
var n = {
bs: (function (e) {
_inheritsLoose(bs, e);
function bs() {
return e.apply(this, arguments) || this;
}
var n = bs.prototype;
n.convertGrammar = function convertGrammar(e, n) {
switch (n) {
case 'instrumental':
e = 's ' + e;
break;
case 'lokativ':
e = 'o ' + e;
}
return e;
};
return bs;
})(e),
default: e,
dsb: (function (e) {
_inheritsLoose(dsb, e);
function dsb() {
return e.apply(this, arguments) || this;
}
var n = dsb.prototype;
n.convertGrammar = function convertGrammar(e, n) {
switch (n) {
case 'instrumental':
e = 'z ' + e;
break;
case 'lokatiw':
e = 'wo ' + e;
}
return e;
};
return dsb;
})(e),
fi: (function (e) {
_inheritsLoose(fi, e);
function fi() {
return e.apply(this, arguments) || this;
}
var n = fi.prototype;
n.convertGrammar = function convertGrammar(e, n) {
var r = e.match(/[aou][^\xe4\xf6y]*$/i),
s = e;
switch (
(e.match(/wiki$/i) && (r = !1),
e.match(/[bcdfghjklmnpqrstvwxz]$/i) && (e += 'i'),
n)
) {
case 'genitive':
e += 'n';
break;
case 'elative':
e += r ? 'sta' : 'st\xe4';
break;
case 'partitive':
e += r ? 'a' : '\xe4';
break;
case 'illative':
e += e.slice(-1) + 'n';
break;
case 'inessive':
e += r ? 'ssa' : 'ss\xe4';
break;
default:
e = s;
}
return e;
};
return fi;
})(e),
ga: (function (e) {
_inheritsLoose(ga, e);
function ga() {
return e.apply(this, arguments) || this;
}
var n = ga.prototype;
n.convertGrammar = function convertGrammar(e, n) {
if ('ainmlae' === n) {
switch (e) {
case 'an Domhnach':
e = 'D\xe9 Domhnaigh';
break;
case 'an Luan':
e = 'D\xe9 Luain';
break;
case 'an Mh\xe1irt':
e = 'D\xe9 Mh\xe1irt';
break;
case 'an Ch\xe9adaoin':
e = 'D\xe9 Ch\xe9adaoin';
break;
case 'an D\xe9ardaoin':
e = 'D\xe9ardaoin';
break;
case 'an Aoine':
e = 'D\xe9 hAoine';
break;
case 'an Satharn':
e = 'D\xe9 Sathairn';
}
}
return e;
};
return ga;
})(e),
he: (function (e) {
_inheritsLoose(he, e);
function he() {
return e.apply(this, arguments) || this;
}
var n = he.prototype;
n.convertGrammar = function convertGrammar(e, n) {
switch (n) {
case 'prefixed':
case '\u05ea\u05d7\u05d9\u05dc\u05d9\u05ea':
'\u05d5' === e.slice(0, 1) &&
'\u05d5\u05d5' !== e.slice(0, 2) &&
(e = '\u05d5' + e),
'\u05d4' === e.slice(0, 1) && (e = e.slice(1)),
(e.slice(0, 1) < '\u05d0' || e.slice(0, 1) > '\u05ea') &&
(e = '\u05be' + e);
}
return e;
};
return he;
})(e),
hsb: (function (e) {
_inheritsLoose(hsb, e);
function hsb() {
return e.apply(this, arguments) || this;
}
var n = hsb.prototype;
n.convertGrammar = function convertGrammar(e, n) {
switch (n) {
case 'instrumental':
e = 'z ' + e;
break;
case 'lokatiw':
e = 'wo ' + e;
}
return e;
};
return hsb;
})(e),
hu: (function (e) {
_inheritsLoose(hu, e);
function hu() {
return e.apply(this, arguments) || this;
}
var n = hu.prototype;
n.convertGrammar = function convertGrammar(e, n) {
switch (n) {
case 'rol':
e += 'r\xf3l';
break;
case 'ba':
e += 'ba';
break;
case 'k':
e += 'k';
}
return e;
};
return hu;
})(e),
hy: (function (e) {
_inheritsLoose(hy, e);
function hy() {
return e.apply(this, arguments) || this;
}
var n = hy.prototype;
n.convertGrammar = function convertGrammar(e, n) {
return (
'genitive' === n &&
('\u0561' === e.slice(-1)
? (e = e.slice(0, -1) + '\u0561\u0575\u056b')
: '\u0578' === e.slice(-1)
? (e = e.slice(0, -1) + '\u0578\u0575\u056b')
: '\u0563\u056b\u0580\u0584' === e.slice(-4)
? (e = e.slice(0, -4) + '\u0563\u0580\u0584\u056b')
: (e += '\u056b')),
e
);
};
return hy;
})(e),
la: (function (e) {
_inheritsLoose(la, e);
function la() {
return e.apply(this, arguments) || this;
}
var n = la.prototype;
n.convertGrammar = function convertGrammar(e, n) {
switch (n) {
case 'genitive':
e = (e = (e = (e = (e = (e = (e = (e = (e = e.replace(
/u[ms]$/i,
'i'
)).replace(/ommunia$/i, 'ommunium')).replace(
/a$/i,
'ae'
)).replace(/libri$/i, 'librorum')).replace(
/nuntii$/i,
'nuntiorum'
)).replace(/tio$/i, 'tionis')).replace(
/ns$/i,
'ntis'
)).replace(/as$/i, 'atis')).replace(/es$/i, 'ei');
break;
case 'accusative':
e = (e = (e = (e = (e = (e = (e = (e = (e = e.replace(
/u[ms]$/i,
'um'
)).replace(/ommunia$/i, 'am')).replace(
/a$/i,
'ommunia'
)).replace(/libri$/i, 'libros')).replace(
/nuntii$/i,
'nuntios'
)).replace(/tio$/i, 'tionem')).replace(
/ns$/i,
'ntem'
)).replace(/as$/i, 'atem')).replace(/es$/i, 'em');
break;
case 'ablative':
e = (e = (e = (e = (e = (e = (e = (e = (e = e.replace(
/u[ms]$/i,
'o'
)).replace(/ommunia$/i, 'ommunibus')).replace(
/a$/i,
'a'
)).replace(/libri$/i, 'libris')).replace(
/nuntii$/i,
'nuntiis'
)).replace(/tio$/i, 'tione')).replace(/ns$/i, 'nte')).replace(
/as$/i,
'ate'
)).replace(/es$/i, 'e');
}
return e;
};
return la;
})(e),
os: (function (e) {
_inheritsLoose(os, e);
function os() {
return e.apply(this, arguments) || this;
}
var n = os.prototype;
n.convertGrammar = function convertGrammar(e, n) {
var r, s, d, p;
switch (
((r = '\u043c\xe6'),
(s = ''),
(d = ''),
(p = ''),
e.match(/\u0442\xe6$/i)
? ((e = e.slice(0, -1)), (r = '\xe6\u043c'))
: e.match(
/[\u0430\xe6\u0435\u0451\u0438\u043e\u044b\u044d\u044e\u044f]$/i
)
? (s = '\u0439')
: e.match(/\u0443$/i)
? e
.slice(-2, -1)
.match(
/[\u0430\xe6\u0435\u0451\u0438\u043e\u044b\u044d\u044e\u044f]$/i
) || (s = '\u0439')
: e.match(
/[\u0431\u0432\u0433\u0434\u0436\u0437\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0444\u0445\u0446\u0447\u0448\u0449\u044c\u044a]$/i
) || (d = '-'),
n)
) {
case 'genitive':
p = d + s + '\u044b';
break;
case 'dative':
p = d + s + '\xe6\u043d';
break;
case 'allative':
p = d + r;
break;
case 'ablative':
p = '\u0439' === s ? d + s + '\xe6' : d + s + '\xe6\u0439';
break;
case 'superessive':
p = d + s + '\u044b\u043b';
break;
case 'equative':
p = d + s + '\u0430\u0443';
break;
case 'comitative':
p = d + '\u0438\u043c\xe6';
}
return e + p;
};
return os;
})(e),
ru: (function (e) {
_inheritsLoose(ru, e);
function ru() {
return e.apply(this, arguments) || this;
}
var n = ru.prototype;
n.convertGrammar = function convertGrammar(e, n) {
return (
'genitive' === n &&
('\u044c' === e.slice(-1)
? (e = e.slice(0, -1) + '\u044f')
: '\u0438\u044f' === e.slice(-2)
? (e = e.slice(0, -2) + '\u0438\u0438')
: '\u043a\u0430' === e.slice(-2)
? (e = e.slice(0, -2) + '\u043a\u0438')
: '\u0442\u0438' === e.slice(-2)
? (e = e.slice(0, -2) + '\u0442\u0435\u0439')
: '\u0434\u044b' === e.slice(-2)
? (e = e.slice(0, -2) + '\u0434\u043e\u0432')
: '\u043d\u0438\u043a' === e.slice(-3) &&
(e = e.slice(0, -3) + '\u043d\u0438\u043a\u0430')),
e
);
};
return ru;
})(e),
sl: (function (e) {
_inheritsLoose(sl, e);
function sl() {
return e.apply(this, arguments) || this;
}
var n = sl.prototype;
n.convertGrammar = function convertGrammar(e, n) {
switch (n) {
case 'mestnik':
e = 'o ' + e;
break;
case 'orodnik':
e = 'z ' + e;
}
return e;
};
return sl;
})(e),
uk: (function (e) {
_inheritsLoose(uk, e);
function uk() {
return e.apply(this, arguments) || this;
}
var n = uk.prototype;
n.convertGrammar = function convertGrammar(e, n) {
switch (n) {
case 'genitive':
'\u044c' === e.slice(-1)
? (e = e.slice(0, -1) + '\u044f')
: '\u0456\u044f' === e.slice(-2)
? (e = e.slice(0, -2) + '\u0456\u0457')
: '\u043a\u0430' === e.slice(-2)
? (e = e.slice(0, -2) + '\u043a\u0438')
: '\u0442\u0438' === e.slice(-2)
? (e = e.slice(0, -2) + '\u0442\u0435\u0439')
: '\u0434\u044b' === e.slice(-2)
? (e = e.slice(0, -2) + '\u0434\u043e\u0432')
: '\u043d\u0438\u043a' === e.slice(-3) &&
(e = e.slice(0, -3) + '\u043d\u0438\u043a\u0430');
break;
case 'accusative':
'\u0456\u044f' === e.slice(-2) &&
(e = e.slice(0, -2) + '\u0456\u044e');
}
return e;
};
return uk;
})(e),
};
var r = new RegExp(
'(?:([A-Za-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02b8\u02bb-\u02c1\u02d0\u02d1\u02e0-\u02e4\u02ee\u0370-\u0373\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0482\u048a-\u052f\u0531-\u0556\u0559-\u055f\u0561-\u0587\u0589\u0903-\u0939\u093b\u093d-\u0940\u0949-\u094c\u094e-\u0950\u0958-\u0961\u0964-\u0980\u0982\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd-\u09c0\u09c7\u09c8\u09cb\u09cc\u09ce\u09d7\u09dc\u09dd\u09df-\u09e1\u09e6-\u09f1\u09f4-\u09fa\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3e-\u0a40\u0a59-\u0a5c\u0a5e\u0a66-\u0a6f\u0a72-\u0a74\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd-\u0ac0\u0ac9\u0acb\u0acc\u0ad0\u0ae0\u0ae1\u0ae6-\u0af0\u0af9\u0b02\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b3e\u0b40\u0b47\u0b48\u0b4b\u0b4c\u0b57\u0b5c\u0b5d\u0b5f-\u0b61\u0b66-\u0b77\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe\u0bbf\u0bc1\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcc\u0bd0\u0bd7\u0be6-\u0bf2\u0c01-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c41-\u0c44\u0c58-\u0c5a\u0c60\u0c61\u0c66-\u0c6f\u0c7f\u0c82\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd-\u0cc4\u0cc6-\u0cc8\u0cca\u0ccb\u0cd5\u0cd6\u0cde\u0ce0\u0ce1\u0ce6-\u0cef\u0cf1\u0cf2\u0d02\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d40\u0d46-\u0d48\u0d4a-\u0d4c\u0d4e\u0d57\u0d5f-\u0d61\u0d66-\u0d75\u0d79-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dcf-\u0dd1\u0dd8-\u0ddf\u0de6-\u0def\u0df2-\u0df4\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e4f-\u0e5b\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0ed0-\u0ed9\u0edc-\u0edf\u0f00-\u0f17\u0f1a-\u0f34\u0f36\u0f38\u0f3e-\u0f47\u0f49-\u0f6c\u0f7f\u0f85\u0f88-\u0f8c\u0fbe-\u0fc5\u0fc7-\u0fcc\u0fce-\u0fda\u1000-\u102c\u1031\u1038\u103b\u103c\u103f-\u1057\u105a-\u105d\u1061-\u1070\u1075-\u1081\u1083\u1084\u1087-\u108c\u108e-\u109c\u109e-\u10c5\u10c7\u10cd\u10d0-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1360-\u137c\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u167f\u1681-\u169a\u16a0-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1735\u1736\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17b6\u17be-\u17c5\u17c7\u17c8\u17d4-\u17da\u17dc\u17e0-\u17e9\u1810-\u1819\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1923-\u1926\u1929-\u192b\u1930\u1931\u1933-\u1938\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19da\u1a00-\u1a16\u1a19\u1a1a\u1a1e-\u1a55\u1a57\u1a61\u1a63\u1a64\u1a6d-\u1a72\u1a80-\u1a89\u1a90-\u1a99\u1aa0-\u1aad\u1b04-\u1b33\u1b35\u1b3b\u1b3d-\u1b41\u1b43-\u1b4b\u1b50-\u1b6a\u1b74-\u1b7c\u1b82-\u1ba1\u1ba6\u1ba7\u1baa\u1bae-\u1be5\u1be7\u1bea-\u1bec\u1bee\u1bf2\u1bf3\u1bfc-\u1c2b\u1c34\u1c35\u1c3b-\u1c49\u1c4d-\u1c7f\u1cc0-\u1cc7\u1cd3\u1ce1\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u200e\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u214f\u2160-\u2188\u2336-\u237a\u2395\u249c-\u24e9\u26ac\u2800-\u28ff\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d70\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u302e\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u3190-\u31ba\u31f0-\u321c\u3220-\u324f\u3260-\u327b\u327f-\u32b0\u32c0-\u32cb\u32d0-\u32fe\u3300-\u3376\u337b-\u33dd\u33e0-\u33fe\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua60c\ua610-\ua62b\ua640-\ua66e\ua680-\ua69d\ua6a0-\ua6ef\ua6f2-\ua6f7\ua722-\ua787\ua789-\ua7ad\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua824\ua827\ua830-\ua837\ua840-\ua873\ua880-\ua8c3\ua8ce-\ua8d9\ua8f2-\ua8fd\ua900-\ua925\ua92e-\ua946\ua952\ua953\ua95f-\ua97c\ua983-\ua9b2\ua9b4\ua9b5\ua9ba\ua9bb\ua9bd-\ua9cd\ua9cf-\ua9d9\ua9de-\ua9e4\ua9e6-\ua9fe\uaa00-\uaa28\uaa2f\uaa30\uaa33\uaa34\uaa40-\uaa42\uaa44-\uaa4b\uaa4d\uaa50-\uaa59\uaa5c-\uaa7b\uaa7d-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaaeb\uaaee-\uaaf5\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab65\uab70-\uabe4\uabe6\uabe7\uabe9-\uabec\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\ue000-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]|\ud800[\udc00-\udc0b]|\ud800[\udc0d-\udc26]|\ud800[\udc28-\udc3a]|\ud800\udc3c|\ud800\udc3d|\ud800[\udc3f-\udc4d]|\ud800[\udc50-\udc5d]|\ud800[\udc80-\udcfa]|\ud800\udd00|\ud800\udd02|\ud800[\udd07-\udd33]|\ud800[\udd37-\udd3f]|\ud800[\uddd0-\uddfc]|\ud800[\ude80-\ude9c]|\ud800[\udea0-\uded0]|\ud800[\udf00-\udf23]|\ud800[\udf30-\udf4a]|\ud800[\udf50-\udf75]|\ud800[\udf80-\udf9d]|\ud800[\udf9f-\udfc3]|\ud800[\udfc8-\udfd5]|\ud801[\udc00-\udc9d]|\ud801[\udca0-\udca9]|\ud801[\udd00-\udd27]|\ud801[\udd30-\udd63]|\ud801\udd6f|\ud801[\ude00-\udf36]|\ud801[\udf40-\udf55]|\ud801[\udf60-\udf67]|\ud804\udc00|\ud804[\udc02-\udc37]|\ud804[\udc47-\udc4d]|\ud804[\udc66-\udc6f]|\ud804[\udc82-\udcb2]|\ud804\udcb7|\ud804\udcb8|\ud804[\udcbb-\udcc1]|\ud804[\udcd0-\udce8]|\ud804[\udcf0-\udcf9]|\ud804[\udd03-\udd26]|\ud804\udd2c|\ud804[\udd36-\udd43]|\ud804[\udd50-\udd72]|\ud804[\udd74-\udd76]|\ud804[\udd82-\uddb5]|\ud804[\uddbf-\uddc9]|\ud804\uddcd|\ud804[\uddd0-\udddf]|\ud804[\udde1-\uddf4]|\ud804[\ude00-\ude11]|\ud804[\ude13-\ude2e]|\ud804\ude32|\ud804\ude33|\ud804\ude35|\ud804[\ude38-\ude3d]|\ud804[\ude80-\ude86]|\ud804\ude88|\ud804[\ude8a-\ude8d]|\ud804[\ude8f-\ude9d]|\ud804[\ude9f-\udea9]|\ud804[\udeb0-\udede]|\ud804[\udee0-\udee2]|\ud804[\udef0-\udef9]|\ud804\udf02|\ud804\udf03|\ud804[\udf05-\udf0c]|\ud804\udf0f|\ud804\udf10|\ud804[\udf13-\udf28]|\ud804[\udf2a-\udf30]|\ud804\udf32|\ud804\udf33|\ud804[\udf35-\udf39]|\ud804[\udf3d-\udf3f]|\ud804[\udf41-\udf44]|\ud804\udf47|\ud804\udf48|\ud804[\udf4b-\udf4d]|\ud804\udf50|\ud804\udf57|\ud804[\udf5d-\udf63]|\ud805[\udc80-\udcb2]|\ud805\udcb9|\ud805[\udcbb-\udcbe]|\ud805\udcc1|\ud805[\udcc4-\udcc7]|\ud805[\udcd0-\udcd9]|\ud805[\udd80-\uddb1]|\ud805[\uddb8-\uddbb]|\ud805\uddbe|\ud805[\uddc1-\udddb]|\ud805[\ude00-\ude32]|\ud805\ude3b|\ud805\ude3c|\ud805\ude3e|\ud805[\ude41-\ude44]|\ud805[\ude50-\ude59]|\ud805[\ude80-\udeaa]|\ud805\udeac|\ud805\udeae|\ud805\udeaf|\ud805\udeb6|\ud805[\udec0-\udec9]|\ud805[\udf00-\udf19]|\ud805\udf20|\ud805\udf21|\ud805\udf26|\ud805[\udf30-\udf3f]|\ud806[\udca0-\udcf2]|\ud806\udcff|\ud806[\udec0-\udef8]|\ud808[\udc00-\udf99]|\ud809[\udc00-\udc6e]|\ud809[\udc70-\udc74]|\ud809[\udc80-\udd43]|\ud80c[\udc00-\udfff]|\ud80d[\udc00-\udc2e]|\ud811[\udc00-\ude46]|\ud81a[\udc00-\ude38]|\ud81a[\ude40-\ude5e]|\ud81a[\ude60-\ude69]|\ud81a\ude6e|\ud81a\ude6f|\ud81a[\uded0-\udeed]|\ud81a\udef5|\ud81a[\udf00-\udf2f]|\ud81a[\udf37-\udf45]|\ud81a[\udf50-\udf59]|\ud81a[\udf5b-\udf61]|\ud81a[\udf63-\udf77]|\ud81a[\udf7d-\udf8f]|\ud81b[\udf00-\udf44]|\ud81b[\udf50-\udf7e]|\ud81b[\udf93-\udf9f]|\ud82c\udc00|\ud82c\udc01|\ud82f[\udc00-\udc6a]|\ud82f[\udc70-\udc7c]|\ud82f[\udc80-\udc88]|\ud82f[\udc90-\udc99]|\ud82f\udc9c|\ud82f\udc9f|\ud834[\udc00-\udcf5]|\ud834[\udd00-\udd26]|\ud834[\udd29-\udd66]|\ud834[\udd6a-\udd72]|\ud834\udd83|\ud834\udd84|\ud834[\udd8c-\udda9]|\ud834[\uddae-\udde8]|\ud834[\udf60-\udf71]|\ud835[\udc00-\udc54]|\ud835[\udc56-\udc9c]|\ud835\udc9e|\ud835\udc9f|\ud835\udca2|\ud835\udca5|\ud835\udca6|\ud835[\udca9-\udcac]|\ud835[\udcae-\udcb9]|\ud835\udcbb|\ud835[\udcbd-\udcc3]|\ud835[\udcc5-\udd05]|\ud835[\udd07-\udd0a]|\ud835[\udd0d-\udd14]|\ud835[\udd16-\udd1c]|\ud835[\udd1e-\udd39]|\ud835[\udd3b-\udd3e]|\ud835[\udd40-\udd44]|\ud835\udd46|\ud835[\udd4a-\udd50]|\ud835[\udd52-\udea5]|\ud835[\udea8-\udeda]|\ud835[\udedc-\udf14]|\ud835[\udf16-\udf4e]|\ud835[\udf50-\udf88]|\ud835[\udf8a-\udfc2]|\ud835[\udfc4-\udfcb]|\ud836[\udc00-\uddff]|\ud836[\ude37-\ude3a]|\ud836[\ude6d-\ude74]|\ud836[\ude76-\ude83]|\ud836[\ude85-\ude8b]|\ud83c[\udd10-\udd2e]|\ud83c[\udd30-\udd69]|\ud83c[\udd70-\udd9a]|\ud83c[\udde6-\ude02]|\ud83c[\ude10-\ude3a]|\ud83c[\ude40-\ude48]|\ud83c\ude50|\ud83c\ude51|[\ud840-\ud868][\udc00-\udfff]|\ud869[\udc00-\uded6]|\ud869[\udf00-\udfff]|[\ud86a-\ud86c][\udc00-\udfff]|\ud86d[\udc00-\udf34]|\ud86d[\udf40-\udfff]|\ud86e[\udc00-\udc1d]|\ud86e[\udc20-\udfff]|[\ud86f-\ud872][\udc00-\udfff]|\ud873[\udc00-\udea1]|\ud87e[\udc00-\ude1d]|[\udb80-\udbbe][\udc00-\udfff]|\udbbf[\udc00-\udffd]|[\udbc0-\udbfe][\udc00-\udfff]|\udbff[\udc00-\udffd])|([\u0590\u05be\u05c0\u05c3\u05c6\u05c8-\u05ff\u07c0-\u07ea\u07f4\u07f5\u07fa-\u0815\u081a\u0824\u0828\u082e-\u0858\u085c-\u089f\u200f\ufb1d\ufb1f-\ufb28\ufb2a-\ufb4f\u0608\u060b\u060d\u061b-\u064a\u066d-\u066f\u0671-\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u0710\u0712-\u072f\u074b-\u07a5\u07b1-\u07bf\u08a0-\u08e2\ufb50-\ufd3d\ufd40-\ufdcf\ufdf0-\ufdfc\ufdfe\ufdff\ufe70-\ufefe]|\ud802[\udc00-\udd1e]|\ud802[\udd20-\ude00]|\ud802\ude04|\ud802[\ude07-\ude0b]|\ud802[\ude10-\ude37]|\ud802[\ude3b-\ude3e]|\ud802[\ude40-\udee4]|\ud802[\udee7-\udf38]|\ud802[\udf40-\udfff]|\ud803[\udc00-\ude5f]|\ud803[\ude7f-\udfff]|\ud83a[\udc00-\udccf]|\ud83a[\udcd7-\udfff]|\ud83b[\udc00-\uddff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\udf00-\udfff]|\ud83b[\ude00-\udeef]|\ud83b[\udef2-\udeff]))'
);
var s = (function () {
function t(e) {
(this.locale = e), (this.language = new (n[e] || n.default)(e));
}
var e = t.prototype;
e.emit = function emit(e, n) {
var r = this;
var s, p, g;
switch (typeof e) {
case 'string':
case 'number':
s = e;
break;
case 'object':
(p = e.slice(1).map(function (e) {
return r.emit(e, n);
})),
(g = e[0].toLowerCase()),
(s =
'function' == typeof this[g]
? this[g](p, n)
: '{{' +
new d(this.locale).simpleParse(e[0], n) +
p.map(function (e) {
return '|' + e;
}) +
'}}');
break;
case 'undefined':
s = '';
break;
default:
throw new Error('unexpected type in AST: ' + typeof e);
}
return s;
};
e.concat = function concat(e) {
var n = '';
return (
e.forEach(function (e) {
n += e;
}),
n
);
};
e.replace = function replace(e, n) {
var r = parseInt(e[0], 10);
return r < n.length ? n[r] : '$' + (r + 1);
};
e.plural = function plural(e) {
var n = parseFloat(this.language.convertNumber(e[0], 10)),
r = e.slice(1);
return r.length ? this.language.convertPlural(n, r) : '';
};
e.gender = function gender(e) {
var n = e[0],
r = e.slice(1);
return this.language.gender(n, r);
};
e.grammar = function grammar(e) {
var n = e[0],
r = e[1];
return r && n && this.language.convertGrammar(r, n);
};
e.bidi = function bidi(e) {
var n = (function (e) {
var n = e.match(r);
return n ? (void 0 === n[2] ? 'ltr' : 'rtl') : null;
})(e[0]);
return 'ltr' === n
? '\u202a' + e[0] + '\u202c'
: 'rtl' === n
? '\u202b' + e[0] + '\u202c'
: e[0];
};
e.formatnum = function formatnum(e) {
var n = !!e[1] && 'R' === e[1],
r = e[0];
return 'string' == typeof r || 'number' == typeof r
? this.language.convertNumber(r, n)
: r;
};
return t;
})();
var d = (function () {
function a(e) {
(this.locale = e), (this.emitter = new s(this.locale));
}
var e = a.prototype;
e.parse = function parse(e, n) {
if (e.includes('{{')) {
var r = (function (e) {
var n,
r,
s,
d,
p,
g,
m,
b = 0;
function l(e) {
return function () {
for (var n = 0; n < e.length; n++) {
var r = e[n]();
if (null !== r) {
return r;
}
}
return null;
};
}
function i(e) {
var n = b,
r = [];
for (var s = 0; s < e.length; s++) {
var d = e[s]();
if (null === d) {
return (b = n), null;
}
r.push(d);
}
return r;
}
function f(e, n) {
return function () {
var r = b,
s = [];
var d = n();
for (; null !== d; ) {
s.push(d), (d = n());
}
return s.length < e ? ((b = r), null) : s;
};
}
function o(n) {
var r = n.length;
return function () {
var s = null;
return e.slice(b, b + r) === n && ((s = n), (b += r)), s;
};
}
function h(n) {
return function () {
var r = e.slice(b).match(n);
return null === r ? null : ((b += r[0].length), r[0]);
};
}
var v = o('|'),
k = o(':'),
w = o('\\'),
C = h(/^./),
A = o('$'),
$ = h(/^\d+/),
E = h(/^[^{}$\\]/),
_ = h(/^[^{}$\\|]/);
function x() {
var e = i([w, C]);
return null === e ? null : e[1];
}
function y() {
var e = i([A, $]);
return null === e
? null
: ['REPLACE', parseInt(e[1], 10) - 1];
}
var M, N;
function T() {
var e = i([v, f(0, g)]);
if (null === e) {
return null;
}
var n = e[1];
return n.length > 1 ? ['CONCAT'].concat(n) : n[0];
}
function F() {
var e = i([d, k, y]);
return null === e ? null : [e[0], e[2]];
}
function P() {
var e = i([d, k, g]);
return null === e ? null : [e[0], e[2]];
}
(n = l([x, _])),
(r = l([x, E])),
(M = h(/^[ !"$&'()*,./0-9;=?@A-Z^_`a-z~\x80-\xFF+-]+/)),
(N = function G(e) {
return e.toString();
}),
(d = function a() {
var e = M();
return null === e ? null : N(e);
}),
(s = l([
function () {
var e = i([l([F, P]), f(0, T)]);
return null === e ? null : e[0].concat(e[1]);
},
function () {
var e = i([d, f(0, T)]);
return null === e ? null : [e[0]].concat(e[1]);
},
]));
var I = o('{{'),
R = o('}}');
function j() {
var e = i([I, s, R]);
return null === e ? null : e[1];
}
if (
((p = l([
j,
y,
function () {
var e = f(1, r)();
return null === e ? null : e.join('');
},
])),
(g = l([
j,
y,
function () {
var e = f(1, n)();
return null === e ? null : e.join('');
},
])),
(m = (function () {
var e = f(0, p)();
return null === e ? null : ['CONCAT'].concat(e);
})()),
null === m || b !== e.length)
) {
throw new Error(
'Parse error at position ' +
b.toString() +
' in input: ' +
e
);
}
return m;
})(e);
return this.emitter.emit(r, n);
}
return this.simpleParse(e, n);
};
e.simpleParse = function simpleParse(e, n) {
return e.replace(/\$(\d+)/g, function (e, r) {
var s = parseInt(r, 10) - 1;
return void 0 !== n[s] ? n[s] : '$' + r;
});
};
return a;
})();
var p = (function () {
function c(e) {
this.sourceMap = new Map();
}
var e = c.prototype;
e.load = function load(e, n) {
if ('object' != typeof e) {
throw new Error('Invalid message source. Must be an object');
}
if (n) {
if (!/^[a-zA-Z0-9-]+$/.test(n)) {
throw new Error('Invalid locale ' + n);
}
for (var r in e) {
if (0 !== r.indexOf('@')) {
if ('object' == typeof e[r]) {
return this.load(e);
}
if ('string' != typeof e[r]) {
throw new Error(
'Invalid message for message ' +
r +
' in ' +
n +
' locale.'
);
}
break;
}
}
this.sourceMap.has(n)
? this.sourceMap.set(n, Object.assign(this.sourceMap.get(n), e))
: this.sourceMap.set(n, e);
} else {
for (n in e) {
this.load(e[n], n);
}
}
};
e.getMessage = function getMessage(e, n) {
var r = this.sourceMap.get(n);
return r ? r[e] : null;
};
e.hasLocale = function hasLocale(e) {
return this.sourceMap.has(e);
};
return c;
})();
return (function () {
function _class(e, n) {
var r = n === void 0 ? {} : n,
s = r.finalFallback,
g = s === void 0 ? 'en' : s,
m = r.messages;
(this.locale = e),
(this.parser = new d(this.locale)),
(this.messageStore = new p()),
m && this.load(m, this.locale),
(this.fallbackLocales = []),
(this.finalFallback = g);
}
var n = _class.prototype;
n.load = function load(e, n) {
return this.messageStore.load(e, n || this.locale);
};
n.i18n = function i18n(e) {
for (
var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), s = 1;
s < n;
s++
) {
r[s - 1] = arguments[s];
}
return this.parser.parse(this.getMessage(e), r);
};
n.setLocale = function setLocale(e) {
(this.locale = e), (this.parser = new d(this.locale));
};
n.getFallbackLocales = function getFallbackLocales() {
return [].concat(this.fallbackLocales, [this.finalFallback]);
};
n.setFallbackLocales = function setFallbackLocales(e) {
this.fallbackLocales = e;
};
n.setPluralRules = function setPluralRules(n, r) {
e.pluralRules[n] = r;
};
n.setDigitTransforms = function setDigitTransforms(n, r) {
e.digitTransforms[n] = r;
};
n.getMessage = function getMessage(e) {
var n = this.locale,
r = 0;
var s = this.getFallbackLocales();
for (; n; ) {
var d = n.split('-'),
p = d.length;
do {
var g = d.slice(0, p).join('-'),
m = this.messageStore.getMessage(e, g);
if ('string' == typeof m) {
return m;
}
p--;
} while (p);
(n = s[r]), r++;
}
return e;
};
n.registerParserPlugin = function registerParserPlugin(e, n) {
s.prototype[e] = n;
};
return _class;
})();
});
},
419: function (e, n, s) {
'use strict';
var d;
(function (e) {
e.scriptName = 'Twinkle';
e.userAgent = 'Twinkle (' + mw.config.get('wgWikiID') + ')';
e.changeTags = '';
e.summaryAd = ' ('.concat(e.scriptName, ')');
e.preModuleInitHooks = [];
e.preModuleInitHooksWithConfig = [];
e.registeredModules = [];
e.activeSpecialPages = [
'Block',
'Contributions',
'Recentchanges',
'Recentchangeslinked',
].concat(
Morebits.userIsSysop ? ['DeletedContributions', 'Prefixindex'] : []
);
e.messageOverrides = {};
e.extraMwMessages = [];
})(d || (d = {}));
var p = mw.config.get('wgNamespaceIds');
var g = p[''];
var m = p.talk;
var b = p.special;
var v = p.file;
var k = p.template;
var w = p.category;
var C = p.project;
var A = p.user;
var E = p.user_talk;
var _;
(function (e) {
e.botUsernameRegex = /bot\b/i;
e.flaggedRevsNamespaces = [g, C];
e.permalinkSpecialPageName = 'Special:PermanentLink';
e.redirectTagAliases = ['#REDIRECT'];
e.signatureTimestampFormat = null;
})(_ || (_ = {}));
var M = function extendStatics(e, n) {
M =
Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array &&
function (e, n) {
e.__proto__ = n;
}) ||
function (e, n) {
for (var r in n) {
if (Object.prototype.hasOwnProperty.call(n, r)) {
e[r] = n[r];
}
}
};
return M(e, n);
};
function __extends(e, n) {
if (typeof n !== 'function' && n !== null) {
throw new TypeError(
'Class extends value ' + String(n) + ' is not a constructor or null'
);
}
M(e, n);
function __() {
this.constructor = e;
}
e.prototype =
n === null
? Object.create(n)
: ((__.prototype = n.prototype), new __());
}
var N = function __assign() {
N =
Object.assign ||
function __assign(e) {
for (var n, r = 1, s = arguments.length; r < s; r++) {
n = arguments[r];
for (var d in n) {
if (Object.prototype.hasOwnProperty.call(n, d)) {
e[d] = n[d];
}
}
}
return e;
};
return N.apply(this, arguments);
};
function __rest(e, n) {
var r = {};
for (var s in e) {
if (Object.prototype.hasOwnProperty.call(e, s) && n.indexOf(s) < 0) {
r[s] = e[s];
}
}
if (e != null && typeof Object.getOwnPropertySymbols === 'function') {
for (
var d = 0, s = Object.getOwnPropertySymbols(e);
d < s.length;
d++
) {
if (
n.indexOf(s[d]) < 0 &&
Object.prototype.propertyIsEnumerable.call(e, s[d])
) {
r[s[d]] = e[s[d]];
}
}
}
return r;
}
function __decorate(e, n, r, s) {
var d = arguments.length,
p =
d < 3
? n
: s === null
? (s = Object.getOwnPropertyDescriptor(n, r))
: s,
g;
if (
typeof Reflect === 'object' &&
typeof Reflect.decorate === 'function'
) {
p = Reflect.decorate(e, n, r, s);
} else {
for (var m = e.length - 1; m >= 0; m--) {
if ((g = e[m])) {
p = (d < 3 ? g(p) : d > 3 ? g(n, r, p) : g(n, r)) || p;
}
}
}
return d > 3 && p && Object.defineProperty(n, r, p), p;
}
function __param(e, n) {
return function (r, s) {
n(r, s, e);
};
}
function __metadata(e, n) {
if (
typeof Reflect === 'object' &&
typeof Reflect.metadata === 'function'
) {
return Reflect.metadata(e, n);
}
}
function __awaiter(e, n, r, s) {
function adopt(e) {
return e instanceof r
? e
: new r(function (n) {
n(e);
});
}
return new (r || (r = Promise))(function (r, d) {
function fulfilled(e) {
try {
step(s.next(e));
} catch (e) {
d(e);
}
}
function rejected(e) {
try {
step(s['throw'](e));
} catch (e) {
d(e);
}
}
function step(e) {
e.done ? r(e.value) : adopt(e.value).then(fulfilled, rejected);
}
step((s = s.apply(e, n || [])).next());
});
}
function __generator(e, n) {
var r = {
label: 0,
sent: function sent() {
if (p[0] & 1) {
throw p[1];
}
return p[1];
},
trys: [],
ops: [],
},
s,
d,
p,
g;
return (
(g = { next: verb(0), throw: verb(1), return: verb(2) }),
typeof Symbol === 'function' &&
(g[Symbol.iterator] = function () {
return this;
}),
g
);
function verb(e) {
return function (n) {
return step([e, n]);
};
}
function step(g) {
if (s) {
throw new TypeError('Generator is already executing.');
}
while (r) {
try {
if (
((s = 1),
d &&
(p =
g[0] & 2
? d['return']
: g[0]
? d['throw'] || ((p = d['return']) && p.call(d), 0)
: d.next) &&
!(p = p.call(d, g[1])).done)
) {
return p;
}
if (((d = 0), p)) {
g = [g[0] & 2, p.value];
}
switch (g[0]) {
case 0:
case 1:
p = g;
break;
case 4:
r.label++;
return { value: g[1], done: false };
case 5:
r.label++;
d = g[1];
g = [0];
continue;
case 7:
g = r.ops.pop();
r.trys.pop();
continue;
default:
if (
!((p = r.trys), (p = p.length > 0 && p[p.length - 1])) &&
(g[0] === 6 || g[0] === 2)
) {
r = 0;
continue;
}
if (g[0] === 3 && (!p || (g[1] > p[0] && g[1] < p[3]))) {
r.label = g[1];
break;
}
if (g[0] === 6 && r.label < p[1]) {
r.label = p[1];
p = g;
break;
}
if (p && r.label < p[2]) {
r.label = p[2];
r.ops.push(g);
break;
}
if (p[2]) {
r.ops.pop();
}
r.trys.pop();
continue;
}
g = n.call(e, r);
} catch (e) {
g = [6, e];
d = 0;
} finally {
s = p = 0;
}
}
if (g[0] & 5) {
throw g[1];
}
return { value: g[0] ? g[1] : void 0, done: true };
}
}
var I = Object.create
? function (e, n, r, s) {
if (s === undefined) {
s = r;
}
Object.defineProperty(e, s, {
enumerable: true,
get: function get() {
return n[r];
},
});
}
: function (e, n, r, s) {
if (s === undefined) {
s = r;
}
e[s] = n[r];
};
function __exportStar(e, n) {
for (var r in e) {
if (r !== 'default' && !Object.prototype.hasOwnProperty.call(n, r)) {
I(n, e, r);
}
}
}
function __values(e) {
var n = typeof Symbol === 'function' && Symbol.iterator,
r = n && e[n],
s = 0;
if (r) {
return r.call(e);
}
if (e && typeof e.length === 'number') {
return {
next: function next() {
if (e && s >= e.length) {
e = void 0;
}
return { value: e && e[s++], done: !e };
},
};
}
throw new TypeError(
n ? 'Object is not iterable.' : 'Symbol.iterator is not defined.'
);
}
function __read(e, n) {
var r = typeof Symbol === 'function' && e[Symbol.iterator];
if (!r) {
return e;
}
var s = r.call(e),
d,
p = [],
g;
try {
while ((n === void 0 || n-- > 0) && !(d = s.next()).done) {
p.push(d.value);
}
} catch (e) {
g = { error: e };
} finally {
try {
if (d && !d.done && (r = s['return'])) {
r.call(s);
}
} finally {
if (g) {
throw g.error;
}
}
}
return p;
}
function __spread() {
for (var e = [], n = 0; n < arguments.length; n++) {
e = e.concat(__read(arguments[n]));
}
return e;
}
function __spreadArrays() {
for (var e = 0, n = 0, r = arguments.length; n < r; n++) {
e += arguments[n].length;
}
for (var s = Array(e), d = 0, n = 0; n < r; n++) {
for (var p = arguments[n], g = 0, m = p.length; g < m; g++, d++) {
s[d] = p[g];
}
}
return s;
}
function __spreadArray(e, n, r) {
if (r || arguments.length === 2) {
for (var s = 0, d = n.length, p; s < d; s++) {
if (p || !(s in n)) {
if (!p) {
p = Array.prototype.slice.call(n, 0, s);
}
p[s] = n[s];
}
}
}
return e.concat(p || Array.prototype.slice.call(n));
}
function __await(e) {
return this instanceof __await ? ((this.v = e), this) : new __await(e);
}
function __asyncGenerator(e, n, r) {
if (!Symbol.asyncIterator) {
throw new TypeError('Symbol.asyncIterator is not defined.');
}
var s = r.apply(e, n || []),
d,
p = [];
return (
(d = {}),
verb('next'),
verb('throw'),
verb('return'),
(d[Symbol.asyncIterator] = function () {
return this;
}),
d
);
function verb(e) {
if (s[e]) {
d[e] = function (n) {
return new Promise(function (r, s) {
p.push([e, n, r, s]) > 1 || resume(e, n);
});
};
}
}
function resume(e, n) {
try {
step(s[e](n));
} catch (e) {
settle(p[0][3], e);
}
}
function step(e) {
e.value instanceof __await
? Promise.resolve(e.value.v).then(fulfill, reject)
: settle(p[0][2], e);
}
function fulfill(e) {
resume('next', e);
}
function reject(e) {
resume('throw', e);
}
function settle(e, n) {
if ((e(n), p.shift(), p.length)) {
resume(p[0][0], p[0][1]);
}
}
}
function __asyncDelegator(e) {
var n, r;
return (
(n = {}),
verb('next'),
verb('throw', function (e) {
throw e;
}),
verb('return'),
(n[Symbol.iterator] = function () {
return this;
}),
n
);
function verb(s, d) {
n[s] = e[s]
? function (n) {
return (r = !r)
? { value: __await(e[s](n)), done: s === 'return' }
: d
? d(n)
: n;
}
: d;
}
}
function __asyncValues(e) {
if (!Symbol.asyncIterator) {
throw new TypeError('Symbol.asyncIterator is not defined.');
}
var n = e[Symbol.asyncIterator],
r;
return n
? n.call(e)
: ((e =
typeof __values === 'function'
? __values(e)
: e[Symbol.iterator]()),
(r = {}),
verb('next'),
verb('throw'),
verb('return'),
(r[Symbol.asyncIterator] = function () {
return this;
}),
r);
function verb(n) {
r[n] =
e[n] &&
function (r) {
return new Promise(function (s, d) {
(r = e[n](r)), settle(s, d, r.done, r.value);
});
};
}
function settle(e, n, r, s) {
Promise.resolve(s).then(function (n) {
e({ value: n, done: r });
}, n);
}
}
function __makeTemplateObject(e, n) {
if (Object.defineProperty) {
Object.defineProperty(e, 'raw', { value: n });
} else {
e.raw = n;
}
return e;
}
var R = Object.create
? function (e, n) {
Object.defineProperty(e, 'default', { enumerable: true, value: n });
}
: function (e, n) {
e['default'] = n;
};
function __importStar(e) {
if (e && e.__esModule) {
return e;
}
var n = {};
if (e != null) {
for (var r in e) {
if (r !== 'default' && Object.prototype.hasOwnProperty.call(e, r)) {
I(n, e, r);
}
}
}
R(n, e);
return n;
}
function __importDefault(e) {
return e && e.__esModule ? e : { default: e };
}
function __classPrivateFieldGet(e, n, r, s) {
if (r === 'a' && !s) {
throw new TypeError('Private accessor was defined without a getter');
}
if (typeof n === 'function' ? e !== n || !s : !n.has(e)) {
throw new TypeError(
'Cannot read private member from an object whose class did not declare it'
);
}
return r === 'm' ? s : r === 'a' ? s.call(e) : s ? s.value : n.get(e);
}
function __classPrivateFieldSet(e, n, r, s, d) {
if (s === 'm') {
throw new TypeError('Private method is not writable');
}
if (s === 'a' && !d) {
throw new TypeError('Private accessor was defined without a setter');
}
if (typeof n === 'function' ? e !== n || !d : !n.has(e)) {
throw new TypeError(
'Cannot write private member to an object whose class did not declare it'
);
}
return s === 'a' ? d.call(e, r) : d ? (d.value = r) : n.set(e, r), r;
}
var S = s(795);
var O = s.n(S);
var L = (function (e) {
__extends(ApiError, e);
function ApiError() {
return (e !== null && e.apply(this, arguments)) || this;
}
return ApiError;
})(Error);
function makeArray(e) {
if (!e) {
return [];
}
if (Array.isArray(e)) {
return e;
}
return [e];
}
function isTextRedirect(e) {
return SiteConfig.redirectTagAliases
.map(function (e) {
return new RegExp('^\\s*' + e, 'i');
})
.some(function (n) {
return n.test(e);
});
}
function stripNs(e) {
var n = mw.Title.newFromUserInput(e);
if (!n) {
return e;
}
return n.getNameText();
}
function addNs(e, n) {
var r = mw.Title.newFromUserInput(e, n);
if (!r) {
return e;
}
return r.toText();
}
function urlParamValue(e) {
return mw.util.getParamValue(e);
}
function utils_link(e, n, r) {
return '<a target="_blank" href="'
.concat(mw.util.getUrl(n, r), '">')
.concat(e, '</a>');
}
function sortByNamespace(e, n) {
return e.ns - n.ns || (e.title > n.title ? 1 : -1);
}
function generateArrowLinks(e) {
var n = Morebits.htmlNode('a', ' >');
n.setAttribute('class', 'tw-arrowpage-link');
n.setAttribute('href', mw.util.getUrl(e.value));
n.setAttribute('target', '_blank');
e.nextElementSibling.append(n);
}
function generateBatchPageLinks(e) {
var n = $(e);
var r = Morebits.htmlNode('a', n.val());
r.setAttribute('class', 'tw-batchpage-link');
r.setAttribute('href', mw.util.getUrl(n.val()));
r.setAttribute('target', '_blank');
n.next().prepend([r, ' ']);
}
function makeOptoutLink(e) {
if (!e) {
return '';
}
return 'notwinkle.test/?module=' + e;
}
function makeTemplate(e, n) {
var r = obj_entries(n)
.filter(function (e) {
var n = e[0],
r = e[1];
return !!r;
})
.map(function (e) {
var n = e[0],
r = e[1];
return '|'.concat(n, '=').concat(r);
})
.join('');
return '{{' + e + r + '}}';
}
function obj_values(e) {
return Object.values
? Object.values(e)
: Object.keys(e).map(function (n) {
return e[n];
});
}
function obj_entries(e) {
return Object.entries
? Object.entries(e)
: Object.keys(e).map(function (n) {
return [n, e[n]];
});
}
function obj_fromEntries(e) {
if (Object.fromEntries) {
return Object.fromEntries(e);
}
var n = {};
for (var r = 0, s = e; r < s.length; r++) {
var d = s[r],
p = d[0],
g = d[1];
n[p] = g;
}
return n;
}
function arr_includes(e, n) {
return e.indexOf(n) !== -1;
}
function arr_find(e, n) {
return Array.prototype.find ? e.find(n) : e.filter(n)[0];
}
function arr_flatMap(e, n) {
if (Array.prototype.flatMap) {
return e.flatMap(n);
}
return e.map(n).reduce(function (e, n) {
return e.concat(n);
}, []);
}
function str_includes(e, n) {
return e.indexOf(n) !== -1;
}
function str_startsWith(e, n) {
return String.prototype.startsWith
? e.startsWith(n)
: e.indexOf(n) === 0;
}
function str_endsWith(e, n) {
if (String.prototype.endsWith) {
return e.endsWith(n);
} else {
var r = e.lastIndexOf(n);
return r !== -1 && r === e.length - n.length;
}
}
var D = (function (e) {
__extends(Api, e);
function Api(n, r, s) {
var p = this;
r = $.extend(
{
action: 'query',
format: 'json',
formatversion: '2',
uselang: Y,
errorlang: Y,
errorsuselocal: true,
tags: d.changeTags,
},
r
);
p = e.call(this, n, r, null, s, null) || this;
return p;
}
Api.prototype.post = function (n) {
if (!n) {
n = {};
}
if (!n.headers) {
n.headers = {};
}
n.headers['Api-User-Agent'] = d.userAgent;
return e.prototype.post.call(this, n);
};
return Api;
})(Morebits.wiki.api);
var U;
function initialiseMwApi() {
U = new mw.Api({
parameters: {
action: 'query',
format: 'json',
formatversion: '2',
uselang: Y,
errorlang: Y,
errorsuselocal: true,
tags: d.changeTags,
},
ajax: { headers: { 'Api-User-Agent': d.userAgent } },
});
}
var B = [
'colon-separator',
'semicolon-separator',
'word-separator',
'comma-separator',
'and',
'parentheses',
'percent',
'blanknamespace',
'protectlogpage',
'stable-logpage',
'duration-hours',
'duration-days',
'duration-weeks',
'duration-years',
'protect-expiry-indefinite',
'group-autoconfirmed',
'group-sysop',
'protectexpiry',
'restriction-edit',
'restriction-move',
'restriction-create',
'restriction-level-autoconfirmed',
'restriction-level-sysop',
'block-expiry',
'blocklogpage',
'period-am',
'period-pm',
'january',
'jan',
'february',
'feb',
'march',
'mar',
'april',
'apr',
'may_long',
'may',
'june',
'jun',
'july',
'jul',
'august',
'aug',
'september',
'sep',
'october',
'oct',
'november',
'nov',
'december',
'dec',
'sunday',
'sun',
'monday',
'mon',
'tuesday',
'tue',
'wednesday',
'wed',
'thursday',
'thu',
'friday',
'fri',
'saturday',
'sat',
'sunday',
'sun',
];
var W = JSON.parse(
'{"@metadata":{"authors":["SD0001"]},"tooltip-mark":"?","relative-today":"[Today at] h:mm A","relative-prevday":"[Yesterday at] h:mm A","relative-nextday":"[Tomorrow at] h:mm A","relative-thisweek":"dddd [at] h:mm A","relative-pastweek":"[Last] dddd [at] h:mm A","relative-other":"YYYY-MM-DD","done":"Done","api-error":"$1 \\"$2\\" occurred while contacting the API.","invalid-token-retrying":"Invalid token. Getting a new token and retrying...","getting-token":"Retrieving token...","opening-page":"Opening page \\"$1\\"","retrieving-page":"Retrieving page...","protected-edit-warning":"You are about to make an edit to the fully protected page \\"$1\\" (protection expiring {{date:$1|relative|utc}} (UTC)).\\n\\nClick OK to proceed with the edit, or Cancel to skip this edit.","protected-indef-edit-warning":"You are about to make an edit to the fully protected page \\"$1\\" (protected indefinitely).\\n\\nClick OK to proceed with the edit, or Cancel to skip this edit.","protected-aborted":"Edit to fully protected page was aborted.","saving-page":"Saving page...","getting-creator":"Retrieving page creation information","token-fetch-fail":"Failed to retrieve edit token.","invalid-title":"The page title is invalid: $1","cross-redirect-abort":"$1 is a cross-namespace redirect to $2, aborted","redirected":"Redirected from $1 to $2","redirect-resolution-fail":"Could not resolve redirects for: $1","api-error-unknown":"Unknown error received from API while saving page","editconflict-purging":"Edit conflict detected, purging server cache","editconflict-retrying":"Edit conflict detected, reapplying edit","save-failed-retrying":"Save failed, retrying in $1 seconds ...","moving-page":"moving page...","batch-starting":"Performing batch operation","batch-no-pages":"no pages specified","batch-done-page":"completed ([[$1]])","batch-progress":"Done ($1/$2 actions completed successfully)","submit":"Submit Query","bullet-separator":" \u2022 ","revert-mismatch":"The retrieved revision does not match the requested revision.","revert-curid-fail":"Failed to retrieve current revision ID.","revert-user-fail":"Failed to retrieve user who made the revision.","revert-summary":"Restored revision $1 by $2","hidden-user":"an unknown user","querying-user":"Querying user \\"$1\\"","fetching-userinfo":"Retrieving user information...","failed-timestamp":"Failed to retrieve current timestamp.","failed-token":"Failed to retrieve token.","failed-userinfo":"Failed to retrieve user info for $1.","already-blocked-indef":"$1 is already blocked (indefinitely; by $2), would you like to override the block?","already-blocked":"$1 is already blocked (until {{date:$2|relative}}; by $3), would you like to override the block?","reblock-aborted":"Reblock aborted","invalid-block-expiry":"You must provide a valid block expiration.","ip-indef-confirm":"$1 is an IP address, do you really want to block it indefinitely? \\n\\nClick OK to proceed with the block, or Cancel to abort.","ip-indef-aborted":"Indefinite block of IP address was aborted.","admin-block-confirm":"$1 is an administrator, are you sure you want to block them? \\n\\nClick OK to proceed with the block, or Cancel to abort.","admin-block-aborted":"Block of administrator was aborted.","partial-usertalk":"Partial blocks cannot prevent talk page access unless also restricting {{ns:3}} namespace.","blocking":"blocking user...","not-blocked":"User is not blocked.","indirect-block":"User is not directly blocked, but rather $1 is.","unblocking":"unblocking user...","notify-fail-iprange":"Cannot notify IP ranges","notify-self-skip":"You ($1) created this page; skipping user notification","notify-fail-noexist":"Cannot notify the user because the user does not exist.","notify-fail-template":"User talk page transcludes {{$1}}, aborting notification","notify-fail-optout":"User has opted out of this notification, aborting","notify-fail-bot":"User is a bot, aborting notification","notify-fail-blocked":"User is indefinitely blocked, aborting notification","notifying-user":"Notifying $1","watching-user":"Watching user page...","info":"Info","note":"Note","error":"Error","link-rollback":"rollback","link-vandalism":"vandalism","link-goodfaith-rollback":"rollback (AGF)","restore-revision":"restore this version","fetching-data":"Grabbing data of earlier revisions","saving-reverted":"Saving reverted contents","prompt-reason-restore":"Please specify a reason for the revert: ","reversion-complete":"Reversion completed","cant-edit-protected":"Unable to edit the page, it\'s probably protected.","no-revisions":"We have less than one additional revision, thus impossible to revert.","bad-revid":"The most recent revision ID received from the server, <strong>$1</strong>, is less than the ID of the displayed revision. This could indicate that the current revision has been deleted, the server is lagging, or that bad data has been received. Stopping revert.","revid-mismatch":"Latest revision <strong>$1</strong> doesn\'t equal our revision <strong>$2</strong>","latest-rev-same-user":"Latest revision was also made by <strong>$1</strong>. As we assume vandalism, we will proceed to revert.","latest-rev-same-64":"Latest revision was made by <strong>$1</strong>, which is on the same /64 subnet. As we assume vandalism, we will proceed to revert.","latest-rev-other-user-goodfaith":"Latest revision was made by <strong>$1</strong>. As we assume good faith, we will stop the revert, as the problem might have been fixed.","latest-rev-other-user":"Latest revision was made by <strong>$1</strong>, but we will stop the revert.","latest-rev-bot":"Latest revision was made by <strong>$1</strong>, a trusted bot, and the revision before was made by our vandal, so we will proceed with the revert.","latest-rev-reverted":"Latest revision was made by <strong>$1</strong>, so it might have already been reverted, we will stop the revert.","bot-revert":"Vandalism revert was chosen on <strong>$1</strong>. As this is a trusted bot, we assume you wanted to revert vandalism made by the previous user instead.","bot-revert-goodfaith":"Good faith revert was chosen on <strong>$1</strong>. This is a trusted bot and thus AGF rollback will not proceed.","bot-revert-prompt":"Normal revert was chosen, but the most recent edit was made by a trusted bot ($1). Do you want to revert the revision before instead?","bot-revert-previous":"Normal revert was chosen on <strong>$1</strong>. This is a trusted bot, and per confirmation, we\'ll revert the previous revision instead.","bot-revert-selected":"Normal revert was chosen on <strong>$1</strong>. This is a trusted bot, but per confirmation, revert on selected revision will proceed.","ipv6-same-user":"Treating consecutive IPv6 addresses in the same /64 as the same user","no-previous-revision":"No previous revision found. Perhaps <strong>$1</strong> is the only contributor, or they have made more than {{formatnum:$2}} edits in a row.","no-edits-revert":"As it is not possible to revert zero revisions, we will stop this revert. It could be that the edit has already been reverted, but the revision ID was still the same.","revert-multiple-prompt":"$1 has made {{formatnum:$2}} edits in a row. Are you sure you want to revert them all?","stopping":"Stopping revert.","revision-age":" revision <strong>$1</strong> that was made <strong>{{formatnum:$2}}</strong> revisions ago by $3","summary-prompt":"An optional comment for the edit summary: ","user-aborted":"Aborted by user.","restore-summary":"Restored revision $1 by %USER%","goodfaith-summary":"Reverted good faith edits by %USER%","vandalism-summary":"Reverted {{formatnum:$1}} {{plural:$1|edit|edits}} by %USER% to last revision by $2","normal-summary":"Reverted {{formatnum:$1}} {{plural:$1|edit|edits}} by %USER%","revert-confirm":"Reverting page: are you sure?","revert-complete":"Reversion completed","opening-talk":"Opening user talk page edit form for user <strong>$1</strong>","pcreview-comment":"Automatically reviewing reversion","pcreview-accepting":"Automatically accepting your changes","diff-last":"Last","diff-last-tooltip":"Show most recent diff","diff-since":"Since","diff-since-tooltip":"Show difference between last diff and the revision made by previous user","diff-sincemine":"Since mine","diff-sincemine-tooltip":"Show difference between last diff and my last revision","diff-current":"Current","diff-current-tooltip":"Show difference to current revision","diff-error":"no suitable earlier revision found, or $1 is the only contributor. Aborting.","reason":"Reason:","reason-tooltip":"You can use wikimarkup in your reason. Twinkle will automatically sign your post.","loading":"Loading...","select-all":"Select All","deselect-all":"Deselect All","fetching-list":"Grabbing list of pages","option-delete":"Delete pages","option-talks":"Delete associated talk pages (except user talk pages)","option-redirects":"Delete redirects to deleted pages","option-subpages":"Delete subpages of deleted pages","option-subpage-talks":"Delete talk pages of deleted subpages","option-subpage-redirects":"Delete redirects to deleted subpages","option-subpage-unlink":"Unlink backlinks to each deleted subpage (in Main and Portal namespaces only)","option-unlink":"Unlink backlinks to each page (in Main and Portal namespaces only)","option-unlink-file":"Remove usages of each file (in all namespaces)","pages-label":"Pages to delete","complete":"Batch deletion is now complete","confirm-protected":"You are about to delete {{formatnum:$1}} fully protected page(s). Are you sure?","dbatch-give-reason":"You need to give a reason, you cabal crony!","dbatch-no-pages":"nothing to delete, aborting","deleting":"Deleting pages","starting":"Initiating requested tasks","deleting-page":"Deleting page $1","deleting-subpages":"Deleting subpages","deleting-subpage":"Deleting subpage $1","fetching-backlinks":"Grabbing backlinks","fetching-filelinks":"Grabbing file links","fetching-redirects":"Grabbing redirects","check-talk":"Checking whether talk page exists","deleting-redirects":"Deleting redirects to $1","delete-redirect-summary":"Redirect to deleted page \\"$1\\"","deleting-talk":"Deleting talk page of page $1","delete-talk-summary":"Talk page of deleted page \\"$1\\"","unlink-page":"Unlinking backlinks to $1","unlink-on":"Unlinking on $1","unlink-summary":"Removing link(s) to deleted page $1","unlink-img-on":"Removing file usages on $1","img-comment":"Commented out because image was deleted","unlink-img-summary":"Removing instance of file $1 that has been deleted because \\"$2\\"","undbatch-restore-talks":"Restore talk pages of undeleted pages if they existed","undbatch-pages-label":"Pages to undelete","undbatch-complete":"Batch undeletion is now complete","undbatch-confirm-protected":"You are about to undelete {{formatnum:$1}} fully create protected page(s). Are you sure?","undbatch-no-pages":"nothing to undelete, aborting","undeleting":"Undeleting pages","undeleting-page":"Undeleting page $1","check-talk-deleted":"Checking talk page for deleted revisions","undeleting-talk-status":"Undeleting talk page of $1","undeleting-talk-summary":"Undeleting talk page of \\"$1\\"","create-protected-indef":"(fully create protected indefinitely)","create-protected":"(fully create protected, expires $1 (UTC))","unlink-title":"Unlinking backlinks","unlink-title-file":"Unlinking backlinks and file usages","unlink-intro":"This tool allows you to unlink all incoming links (\\"backlinks\\") that point to this page. For instance, <code>[[$1|link text]]</code> would become <code>link text</code> and <code>[[$1]]</code> would become <code>$1</code>. Use it with caution.","unlink-intro-file":"This tool allows you to unlink all incoming links (\\"backlinks\\") that point to this page and/or hide all inclusions of this file by wrapping them in <!-- --> comment markup. For instance, <code>[[:$1|link text]]</code> would become <code>link text</code> and <code>[[$1]]</code> would become <code><!-- [[$1]] --></code>. Use it with caution.","unlink-give-reason":"You must specify a reason for unlinking.","unlink-select-one":"You must select at least one item to unlink.","unlink-status-links-files":"Unlinking backlinks and instances of file usage","unlink-status-links":"Unlinking backlinks","unlink-status-files":"Unlinking instances of file usage","unlink-in":"Unlinking in page \\"$1\\"","no-file-usage":"No instances of file usage found.","file-usage":"File usage","first-n-files":"First {{formatnum:$1}} file usages shown.","backlinks":"Backlinks","no-backlinks":"No backlinks found.","first-n-links":"First {{formatnum:$1}} backlinks shown.","change-twpref":"You can change this with your Twinkle preferences, linked at the bottom of this Twinkle window","selected-namespaces":"Selected namespaces: {{list:$1}}","commented-out":"Commented out","no-links-files-found":"Didn\'t find any backlinks or file usages on the page.","no-links-found":"Didn\'t find any backlinks on the page.","no-files-found":"Didn\'t find any file usages on the page.","summary-links-files":"Commenting out use(s) of file / Removing link(s) to \\"$1\\"","summary-links":"Removing link(s) to \\"$1\\"","summary-files":"Commenting out use(s) of file to \\"$1\\"","protect-action-type":"Type of action","protect-protect-label":"Protect page","protect-protect-tooltip":"Apply actual protection to the page.","protect-tag-label":"Tag page with protection template","protect-tag-tooltip":"If the protecting admin forgot to apply a protection template, or you have just protected the page without tagging, you can use this to apply the appropriate protection tag.","protect-request-label":"Request page protection","protect-request-tooltip":"If you want to request protection via WP:RPP.","protect-request-sysop-tooltip":"If you want to request protection via WP:RPP instead of doing the protection by yourself.","preset":"Preset","choose-preset":"Choose a preset:","prev-protections":"Previous protections","past-protected":"This page has been protected in the past","sysops-contacted":"Have you attempted to contact the protecting admins ({{list:$1}}) first?","unprotected-time":"unprotected {{date:$1|relative|utc}}","expired-time":"expired {{date:$1|relative|utc}}","expires-time":"expires {{date:$1|relative|utc}}","reset-time":"reset {{date:$1|relative|utc}}","duration-months":"$1 {{plural:$1|month|months}}","protect-options":"Protection options","protect-edit-modify":"Modify edit protection","protect-edit-modify-tooltip":"If this is turned off, the edit protection level, and expiry time, will be left as is.","protect-edit-label":"Edit protection:","protect-move-modify":"Modify move protection","protect-move-modify-tooltip":"If this is turned off, the move protection level, and expiry time, will be left as is.","protect-move-label":"Move protection:","protect-stable-modify":"Modify pending changes protection","protect-stable-modify-tooltip":"If this is turned off, the pending changes level, and expiry time, will be left as is.","protect-stable-label":"Pending changes:","protect-create-label":"Create protection:","protect-reason":"Reason (for protection log):","protect-current-label":"Current protection level","protect-current-none":"<b>no protection</b>","protect-current":"<b>$1: $2</b>","protect-current-cascading":"<b>$1: $2 (cascading)</b>","protect-current-stable":"<b>Pending changes: $1</b>","protect-cascade-from":"<b>Cascading protection</b> from [[$1]]","by-sysop":"by [[{{ns:3}}:$1|$1]]","duration-label":"Duration:","protect-notes-label":"Notes:","note-requested-label":"$1 request","note-requested-tooltip":"Add a note to the protection log that this was requested at $1","note-requested":"requested at $1","request-revid-label":"$1 revision ID","request-revid-tooltip":"Optional revision ID of the $1 page where protection was requested.","protect-select-tag":"Choose protection template:","protect-tag-small-label":"Iconify","protect-tag-small-tooltip":"Will use the |small=yes feature of the template, and only render it as a keylock","protect-tag-noinclude-label":"Wrap protection template with <noinclude>","protect-tag-noinclude-tooltip":"Will wrap the protection template in <noinclude> tags, so that it won\'t transclude","protect-request-preset-label":"Type of protection","protect-request-type-label":"Type and reason:","temporary":"Temporary","custom-expiry-prompt":"Enter a custom expiry time. \\nYou can use relative times, like \\"1 minute\\" or \\"19 days\\", or absolute timestamps, \\"yyyymmddhhmm\\" (e.g. \\"200602011405\\" is Feb 1, 2006, at 14:05 UTC).","all-users":"All","custom-expiry-label":"Custom...","protect-request-exists":"There is already a protection request for this page at [[$1]], aborting.","protect-tag-adding":"Applying protection template","protect-tag-none-status":"nothing to do","protect-tag-exists-prompt":"{{$1}} was found on the page. \\nClick OK to remove it, or click Cancel to leave it there.","protect-tag-removing":"Removing protection template","protect-tag-abort":"Redirect category shell present","nothing-to-do":"nothing to do","block-window-title":"Block or issue block template to $1","block-self-warn":"You are about to block yourself! Are you sure you want to proceed?","block-action":"Block user","block-action-tooltip":"Block the relevant user with the given options. If partial block is unchecked, this will be a sitewide block.","block-partial":"Partial block","block-partial-tooltip":"Enable partial blocks and partial block templates.","block-tag":"Add block template to user talk page","block-tag-tooltip":"Add block template to user talk page","block-64-field-label":"Convert to /64 rangeblock","block-64-help":"It\'s usually fine, if not better, to block the /64 range ([[Special:Contributions/$1|$1]]).","block-64-label":"Block the /64 instead","block-64-template":"Any template issued will go to the original IP: $1","block-tag-options":"Template options","block-block-options":"Block options","block-expiry-indefinite":"indefinite","unblock-label":"Unblock this user","block-custom-expiry":"Custom expiry","block-custom-expiry-tooltip":"You can use relative times, like \\"1 minute\\" or \\"19 days\\", or absolute timestamps, \\"yyyymmddhhmm\\" (e.g. \\"200602011405\\" is Feb 1, 2006, at 14:05 UTC).","fetching-userinfo-error":"Error fetching user info","block-prior-label":"Prior block settings","block-pages-label":"Specific pages to block from editing","block-pages-tooltip":"10 page max.","block-namespaces-label":"Namespace blocks","block-namespaces-tooltip":"Block from editing these namespaces.","block-nocreate-label":"Block account creation","block-noemail-label":"Block user from sending email","block-disabletalk-label":"Prevent this user from editing their own talk page while blocked","block-partial-disabletalk-tooltip":"If issuing a partial block, this MUST remain unchecked unless you are also preventing them from editing User talk space","block-auto-label":"Autoblock any IP addresses used (hardblock)","block-hard-label":"Block logged-in users from using this IP address (hardblock)","block-watch-label":"Watch user and user talk pages","block-reason-label":"Reason (for block log):","block-reason-tooltip":"Consider adding helpful details to the default message.","block-see-label":"See also:","block-see-tooltip":"Insert a \\"see also\\" message to indicate whether the filter log or deleted contributions played a role in the decision to block.","block-see-filter":"Filter log","block-see-deleted":"Deleted contribs","block-tag-template":"Choose talk page template:","block-linked-label":"Linked page","block-linked-tooltip":"A page can be linked within the notice, perhaps if it was the primary target of disruption. Leave empty for no page to be linked.","block-partial-area-label":"Area blocked from","block-partial-area-tooltip":"Optional explanation of the pages or namespaces the user was blocked from editing.","block-tag-expiry":"Period of blocking:","block-tag-expiry-tooltip":"The period the blocking is due for, for example 24 hours, 2 weeks, indefinite etc...","block-tag-reason-label":"You have been blocked for ...","block-tag-reason-tooltip":"An optional reason, to replace the default generic reason. Only available for the generic block templates.","block-tag-noexpiry-label":"Do not include expiry in template","block-tag-noexpiry-tooltip":"Instead of including the duration, make the block template read \\"You have been blocked temporarily...\\"","block-tag-notalk-label":"Talk page access disabled","block-tag-notalk-tooltip":"Make the block template state that the user\'s talk page access has been removed","block-tag-noemail-label":"User blocked from sending email","block-tag-noemail-tooltip":"If the area is not provided, make the block template state that the user\'s email access has been removed","block-tag-nocreate-label":"User blocked from creating accounts","block-tag-nocreate-tooltip":"If the area is not provided, make the block template state that the user\'s ability to create accounts has been removed","select2-badsearch":"Incomplete or invalid search term","block-namespaces-placeholder":"Select namespaces to block user from","block-pages-placeholder":"Select pages to block user from","block-current-partial":"$1 is partially blocked","block-current":"$1 is blocked sitewide","block-current-range":"$1 is blocked sitewide as a rangeblock","block-current-in-range":"$1 is blocked sitewide within a /$2 rangeblock ($3)","block-current-partial-range":"$1 is partially blocked as a rangeblock","block-current-partial-in-range":"$1 is partially blocked within a /$2 rangeblock ($3)","block-expiry-date":"expires {{date:$1|relative|utc}}","block-current-change":"This form will change the existing block.","block-current-add":"This form will add an additional block.","unblocked-ago":"unblocked {{date:$1|relative|utc}}","block-expired":"$1, expired {{date:$2|relative|utc}}","block-log-current":"Previous blocks","block-log-past":"This user has been blocked in the past","block-partial-blank":"No pages or namespaces were selected, nor were email or account creation restrictions applied; please select at least one option to apply a partial block!","block-warn-noexpiry":"Please provide an expiry!","block-warn-indef-ip":"Can\'t indefinitely block an IP address!","block-warn-noreason":"Please provide a reason for the block!","block-doing":"Executing block","block-warn-partial-usertalk":"Partial blocks cannot prevent talk page access unless also restricting them from editing User talk space!","block-conflict":"The block status of $1 has changed. Last block log entry:","block-conflict-block":"Blocked by $1 with comment \\"$2\\". Expiring {{date:$3|relative|utc}}. Do you want to override with your settings?","block-conflict-unblock":"Unblocked by $1 with comment \\"$2\\". ({{date:$3|relative|utc}}.) Do you want to override with your settings?","block-noop":"Please give Twinkle something to do!","block-complete":"Actions complete, loading user talk page in a few seconds","block-tagging-status":"User talk page modification","block-blank-talk":"Blanking talk page per preferences and creating a new talk page section for this month","block-new-section":"Will create a new talk page section for this month, as none was found","search-tags":"Filter tag list:","summary-added":"Added {{list:$1}} {{plural:$2|tag|tags}}","summary-removed":"Removed {{list:$1}} {{plural:$2|tag|tags}}","summary-added-removed":"Added {{list:$1}}; and removed {{list:$2}} {{plural:$3|tag|tags}}","status-added":"Added $1 {{plural:$1|tag|tags}}","status-removed":"Removed $1 {{plural:$1|tag|tags}}","status-added-removed":"Added $1 {{plural:$1|tag|tags}}; Removed $2 {{plural:$2|tag|tags}}","untag-from-read":"For removal of existing tags, please open Tag menu from the current version of article","tags-present-header":"Tags already present","mark-patrolled":"Mark the page as patrolled/reviewed","tag-complete":"Tagging complete, reloading $1 in a few seconds","select-one":"You must select at least one tag!","getting-redirects":"Getting template redirects","cant-reposition":"Failed to find {{$1}} on the page... skip repositioning","cant-remove":"Failed to find {{$1}} on the page... cannot remove","untagging":"Untagging","removing":"Already present tags: removing de-selected tags","resolved-redirect":"Resolved template redirect {{$1}} to {{$2}}","tagging-status":"Tagging $1","tag-fetching-redirects":"Getting redirects for {{list:$1}}","xfd-venue-label":"Deletion discussion venue:","xfd-venue-tooltip":"When activated, a default choice is made, based on what namespace you are in. This default should be the most appropriate.","notify-creator-label":"Notify page creator if possible","notify-creator-tooltip":"A notification template will be placed on the creator\'s talk page if this is true.","deletion-reason-here":"Your deletion rationale is provided below, which you can copy and paste into a new XFD dialog if you wish to try again:","looking-old-nominations":"Looking for prior nominations of this page","bad-venue":"Unrecognised venue: $1","nomination-complete-redirect":"Nomination complete, now redirecting to the discussion page","protected-no-editreq":"Page protected and nowhere to add an edit request, aborting","protected-editreq":"Page protected, requesting edit","posting-editreq":"Automatically posting edit request on talk page","xfd-editreq-title":"Edit request to complete $1 nomination","xfd-editreq-failed":"Unable to add edit request, the talk page may be protected","fetching-creator":"Finding page creator","notifying-creator":"Notifying initial contributor ($1)","pref-logxfdnominations-label":"Keep a log in userspace of all pages you nominate for a deletion discussion (XfD)","pref-logxfdnominations-tooltip":"The userspace log offers a good way to keep track of all pages you nominate for XfD using Twinkle.","pref-xfdlogpagename-label":"Keep the deletion discussion userspace log at this user subpage","pref-xfdlogpagename-tooltip":"Enter a subpage name in this box. You will find your XfD log at User:<i>username</i>/<i>subpage name</i>. Only works if you turn on the XfD userspace log.","pref-xfdwatchpage-label":"Add the nominated page to watchlist","pref-xfdwatchdiscussion-label":"Add the deletion discussion page to watchlist","pref-xfdwatchlist-label":"Add the daily log or list page to the watchlist","pref-xfdwatchlist-tooltip":"This only applies for venues where the discussion takes place on a newly-created page which is transcluded on to a log or list page.","pref-xfdwatchuser-label":"Add user talk page of initial contributor to watchlist (when notifying)"}'
);
var q;
var Y = urlParamValue('uselang') || mw.config.get('wgContentLanguage');
var H;
var V = {
date: function (e) {
var n =
typeof e[0].getTime === 'function'
? new Morebits.date(e[0].getTime())
: new Morebits.date(e[0]);
var r = e[1];
var s = e[2] === 'utc' ? 'utc' : undefined;
if (r === 'relative') {
return n.calendar(s);
} else {
return n.format(r, s);
}
},
int: function (e) {
var n = e[0],
r = e.slice(1);
return msg.apply(void 0, __spreadArray([n], r, false));
},
ns: function (e) {
var n = String(e[0]).trim();
if (!/^\d+$/.test(n)) {
n = String(
mw.config.get('wgNamespaceIds')[
n.replace(/ /g, '_').toLowerCase()
]
);
}
n = mw.config.get('wgFormattedNamespaces')[n];
return n || '';
},
ucfirst: function (e) {
return Morebits.string.toUpperCaseFirstChar(e[0]);
},
lcfirst: function (e) {
return Morebits.string.toLowerCaseFirstChar(e[0]);
},
list: function (e) {
var n = e[0];
var r = '';
for (var s = 0; s < n.length; s++) {
r += n[s];
if (n.length - 2 === s) {
r += msg('and') + msg('word-separator');
} else if (n.length - 1 !== s) {
r += msg('comma-separator');
}
}
return r;
},
sysop: function (e) {
return Morebits.userIsSysop ? e[1] : e[2];
},
};
function addMessages(e) {
q.load(e, Y);
}
function msg(e) {
var n = [];
for (var r = 1; r < arguments.length; r++) {
n[r - 1] = arguments[r];
}
if (!q) {
throw new Error(
"Can't emit messages before initMessaging() has run!"
);
}
if (H) {
return '(' + e + ')';
}
return q.i18n.apply(q, __spreadArray([e], n, false));
}
var z = false || !false;
function initMessaging() {
q = new (O())(Y);
obj_entries(V).forEach(function (e) {
var n = e[0],
r = e[1];
q.registerParserPlugin(n, r);
});
Morebits.i18n.setParser({ get: msg });
H = Y === 'qqx';
if (H) {
return Promise.resolve();
}
if (z) {
q.load(W, 'en');
}
var e = B.concat(d.extraMwMessages);
return Promise.all([
loadMediaWikiMessages(e, Y),
loadTwinkleCoreMessages(Y),
])
.catch(function (e) {
mw.notify('Failed to load messages needed for Twinkle', {
type: 'error',
});
})
.finally(function () {
addMessages(d.messageOverrides);
});
}
function loadMediaWikiMessages(e, n) {
var r = [];
for (var s = 0; s < e.length; s += 50) {
r.push(
U.getMessages(e.slice(s, s + 50), {
amlang: n,
maxage: 31536e3,
smaxage: 31536e3,
uselang: 'content',
}).then(function (e) {
addMessages(e);
})
);
}
return Promise.all(r);
}
function loadTwinkleCoreMessages(e) {
if (e === 'en' && z) {
return Promise.resolve();
}
var n = 'tw-i18n-'.concat(e);
var r = mw.storage.getObject(n);
if (
r &&
new Morebits.date(r['@timestamp']).add(2, 'days').isAfter(new Date())
) {
initBanana(r);
return Promise.resolve();
}
return $.get(
'https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/gadgets/TwinkleCore/+/i18n/build-i18n/' +
e +
'.json?format=text'
).then(
function (e) {
var r = JSON.parse(
decodeURIComponent(
window
.atob(e)
.split('')
.map(function (e) {
return (
'%' + ('00' + e.charCodeAt(0).toString(16)).slice(-2)
);
})
.join('')
)
);
r['@timestamp'] = new Date().toISOString();
mw.storage.setObject(n, r);
initBanana(r);
},
function (e) {
mw.log.warn('[twinkle]: no messages loaded from gerrit.', e);
}
);
}
function initBanana(e) {
q.setFallbackLocales(e['@fallbacks']);
delete e['@fallbacks'];
delete e['@timestamp'];
for (var n = 0, r = obj_entries(e); n < r.length; n++) {
var s = r[n],
d = s[0],
p = s[1];
if (p['@pluralrules']) {
q.setPluralRules(d, p['@pluralrules']);
}
if (p['@digittransforms']) {
q.setDigitTransforms(d, p['@digittransforms']);
}
}
q.load(e);
}
function loadAdditionalMediaWikiMessages(e) {
return loadMediaWikiMessages(e, Y);
}
var X;
var Z = {
optionsVersion: 2,
userTalkPageMode: 'tab',
dialogLargeFont: false,
disabledModules: [],
disabledSysopModules: [],
portletArea: null,
portletId: null,
portletName: null,
portletType: null,
portletNext: null,
autolevelStaleDays: 3,
revertMaxRevisions: 50,
batchMax: 5e3,
batchChunks: 50,
summaryAd: ' ([[WP:TW|TW]])',
deletionSummaryAd: ' ([[WP:TW|TW]])',
protectionSummaryAd: ' ([[WP:TW|TW]])',
logXfdNominations: false,
xfdLogPageName: 'XfD log',
noLogOnXfdNomination: [],
xfdWatchDiscussion: 'default',
xfdWatchList: 'no',
xfdWatchPage: 'default',
xfdWatchUser: 'default',
xfdWatchRelated: 'default',
markXfdPagesAsPatrolled: true,
autoMenuAfterRollback: false,
openTalkPage: ['agf', 'norm', 'vand'],
openTalkPageOnAutoRevert: false,
rollbackInPlace: false,
markRevertedPagesAsMinor: ['vand'],
watchRevertedPages: ['agf', 'norm', 'vand', 'torev'],
watchRevertedExpiry: '1 month',
offerReasonOnNormalRevert: true,
confirmOnFluff: false,
confirmOnMobileFluff: true,
showRollbackLinks: ['diff', 'others'],
speedySelectionStyle: 'buttonClick',
watchSpeedyPages: ['g3', 'g5', 'g10', 'g11', 'g12'],
watchSpeedyExpiry: '1 month',
markSpeedyPagesAsPatrolled: false,
defaultWarningGroup: '1',
combinedSingletMenus: false,
showSharedIPNotice: true,
watchWarnings: '1 month',
oldSelect: false,
customWarningList: [],
spiWatchReport: 'yes',
topWelcomes: false,
watchWelcomes: '3 months',
insertUsername: true,
quickWelcomeMode: 'norm',
quickWelcomeTemplate: 'welcome',
customWelcomeList: [],
customWelcomeSignature: true,
markSharedIPAsMinor: true,
markTalkbackAsMinor: true,
insertTalkbackSignature: true,
talkbackHeading: 'New message from ' + mw.config.get('wgUserName'),
mailHeading: "You've got mail!",
};
function setDefaultConfig(e) {
e.forEach(function (e) {
Z[e.name] = e.value;
});
}
function getPref(e) {
if (typeof X === 'object' && X[e] !== undefined) {
return X[e];
}
if (
typeof window.TwinkleConfig === 'object' &&
window.TwinkleConfig[e] !== undefined
) {
return window.TwinkleConfig[e];
}
if (
typeof window.FriendlyConfig === 'object' &&
window.FriendlyConfig[e] !== undefined
) {
return window.FriendlyConfig[e];
}
return Z[e];
}
function loadUserConfig() {
var e = mw.util.wikiScript('index') + '?title=',
n = '&action=raw&ctype=text/javascript&happy=yes';
return $.ajax({
url:
e +
'User:' +
encodeURIComponent(mw.config.get('wgUserName')) +
'/twinkleoptions.js' +
n,
dataType: 'text',
})
.then(function (e) {
if (e === '') {
return;
}
e = e.replace(
/(?:^(?:\/\/[^\n]*\n)*\n*|(?:\/\/[^\n]*(?:\n|$))*$)/g,
''
);
if (e.lastIndexOf('window.Twinkle.prefs = ', 0) === 0) {
e = e.replace(/(?:^window.Twinkle.prefs = |;\n*$)/g, '');
}
try {
var n = JSON.parse(e);
if (n) {
if (n.twinkle || n.friendly) {
X = $.extend(n.twinkle, n.friendly);
} else {
X = n;
}
X.optionsVersion = X.optionsVersion || 1;
}
} catch (e) {
mw.notify('Could not parse your Twinkle preferences', {
type: 'error',
});
}
})
.catch(function () {
mw.notify('Could not load your Twinkle preferences', {
type: 'error',
});
});
}
var J = (function () {
function Config() {}
Config.addGroup = function (e, n) {
Config.sections[e] = n;
};
Config.addPreference = function (e, n) {
Config.sections[e].preferences.push(n);
};
Config.init = function () {
if (
mw.config.get('wgNamespaceNumber') ===
mw.config.get('wgNamespaceIds').project &&
mw.config.get('wgTitle') === 'Twinkle/Preferences' &&
mw.config.get('wgAction') === 'view'
) {
if (!document.getElementById('twinkle-config')) {
return;
}
document.getElementById(
'twinkle-config-titlebar'
).style.backgroundImage =
'url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB%2FqqA%2BAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEhQTFRFr73ZobTPusjdsMHZp7nVwtDhzNbnwM3fu8jdq7vUt8nbxtDkw9DhpbfSvMrfssPZqLvVztbno7bRrr7W1d%2Fs1N7qydXk0NjpkW7Q%2BgAAADVJREFUeNoMwgESQCAAAMGLkEIi%2FP%2BnbnbpdB59app5Vdg0sXAoMZCpGoFbK6ciuy6FX4ABAEyoAef0BXOXAAAAAElFTkSuQmCC)';
var e = document.getElementById('twinkle-config-content');
e.textContent = '';
if (window.TwinkleConfig || window.FriendlyConfig) {
var n = document.createElement('p');
n.innerHTML =
'<table class="plainlinks ombox ombox-content"><tr><td class="mbox-image">' +
'<img alt="" src="https://upload.wikimedia.org/wikipedia/commons/3/38/Imbox_content.png" /></td>' +
'<td class="mbox-text"><p><big><b>Before modifying your settings here,</b> you must remove your old Twinkle and Friendly settings from your personal skin JavaScript.</big></p>' +
'<p>To do this, you can <a href="' +
mw.util.getUrl(
'User:' +
mw.config.get('wgUserName') +
'/' +
mw.config.get('skin') +
'.js',
{ action: 'edit' }
) +
'" target="_blank"><b>edit your personal skin javascript file</b></a> or <a href="' +
mw.util.getUrl(
'User:' + mw.config.get('wgUserName') + '/common.js',
{ action: 'edit' }
) +
'" target="_blank"><b>your common.js file</b></a>, removing all lines of code that refer to <code>TwinkleConfig</code> and <code>FriendlyConfig</code>.</p>' +
'</td></tr></table>';
e.appendChild(n);
}
var r = document.createElement('div');
r.className = 'toc';
r.style.marginLeft = '0.4em';
var s = document.createElement('div');
s.id = 'toctitle';
var d = document.createElement('h2');
d.textContent = 'Contents ';
s.appendChild(d);
var p = document.createElement('span');
p.className = 'toctoggle';
p.appendChild(document.createTextNode('['));
var g = document.createElement('a');
g.className = 'internal';
g.setAttribute('href', '#tw-tocshowhide');
g.textContent = 'hide';
p.appendChild(g);
p.appendChild(document.createTextNode(']'));
s.appendChild(p);
r.appendChild(s);
var m = document.createElement('ul');
g.addEventListener(
'click',
function twinkleconfigTocToggle() {
var e = $(m);
e.toggle();
if (e.find(':visible').length) {
g.textContent = 'hide';
} else {
g.textContent = 'show';
}
},
false
);
r.appendChild(m);
e.appendChild(r);
var b = document.createElement('form');
b.setAttribute('action', 'javascript:void(0)');
b.addEventListener('submit', Config.save, true);
e.appendChild(b);
var v = document.createElement('table');
v.style.width = '100%';
b.appendChild(v);
obj_values(Config.sections).forEach(function (e) {
if (e.hidden || (e.adminOnly && !Morebits.userIsSysop)) {
return true;
}
var n = document.createElement('li');
n.className = 'toclevel-1';
var r = document.createElement('a');
r.setAttribute('href', '#' + e.module);
r.appendChild(document.createTextNode(e.title));
n.appendChild(r);
m.appendChild(n);
var s = document.createElement('tr');
var d = document.createElement('td');
d.setAttribute('colspan', '3');
var p = document.createElement('h4');
p.style.borderBottom = '1px solid gray';
p.style.marginTop = '0.2em';
p.id = e.module;
p.appendChild(document.createTextNode(e.title));
d.appendChild(p);
s.appendChild(d);
v.appendChild(s);
var g = 1;
e.preferences.forEach(function (e) {
if (e.adminOnly && !Morebits.userIsSysop) {
return true;
}
s = document.createElement('tr');
s.style.marginBottom = '0.2em';
if (g++ % 2 === 0) {
s.style.backgroundColor = 'rgba(128, 128, 128, 0.1)';
}
d = document.createElement('td');
var n,
r,
p = getPref(e.name);
switch (e.type) {
case 'boolean':
d.setAttribute('colspan', '2');
n = document.createElement('label');
r = document.createElement('input');
r.setAttribute('type', 'checkbox');
r.setAttribute('id', e.name);
r.setAttribute('name', e.name);
if (p === true) {
r.setAttribute('checked', 'checked');
}
n.appendChild(r);
n.appendChild(document.createTextNode(' ' + e.label));
d.appendChild(n);
break;
case 'string':
case 'integer':
d.style.textAlign = 'right';
d.style.paddingRight = '0.5em';
n = document.createElement('label');
n.setAttribute('for', e.name);
n.appendChild(document.createTextNode(e.label + ':'));
d.appendChild(n);
s.appendChild(d);
d = document.createElement('td');
d.style.paddingRight = '1em';
r = document.createElement('input');
r.setAttribute('type', 'text');
r.setAttribute('id', e.name);
r.setAttribute('name', e.name);
if (e.type === 'integer') {
r.setAttribute('size', 6);
r.setAttribute('type', 'number');
r.setAttribute('step', '1');
}
if (p) {
r.setAttribute('value', p);
}
d.appendChild(r);
break;
case 'enum':
d.style.textAlign = 'right';
d.style.paddingRight = '0.5em';
n = document.createElement('label');
n.setAttribute('for', e.name);
n.appendChild(document.createTextNode(e.label + ':'));
d.appendChild(n);
s.appendChild(d);
d = document.createElement('td');
d.style.paddingRight = '1em';
r = document.createElement('select');
r.setAttribute('id', e.name);
r.setAttribute('name', e.name);
$.each(e.enumValues, function (e, n) {
var s = document.createElement('option');
s.setAttribute('value', e);
if (
p === e ||
(typeof p === 'boolean' &&
((p && e === 'yes') || (!p && e === 'no')))
) {
s.setAttribute('selected', 'selected');
}
s.appendChild(document.createTextNode(n));
r.appendChild(s);
});
d.appendChild(r);
break;
case 'set':
d.setAttribute('colspan', '2');
n = document.createElement('label');
n.appendChild(document.createTextNode(e.label + ':'));
d.appendChild(n);
var m = document.createElement('div');
m.style.paddingLeft = '1em';
var worker = function (n, r) {
var s = document.createElement('label');
s.style.marginRight = '0.7em';
s.style.display = 'inline-block';
var d = document.createElement('input');
d.setAttribute('type', 'checkbox');
d.setAttribute('id', e.name + '_' + n);
d.setAttribute('name', e.name + '_' + n);
if (p && p.indexOf(n) !== -1) {
d.setAttribute('checked', 'checked');
}
if (e.name === 'unlinkNamespaces') {
if (p && p.indexOf(parseInt(n, 10)) !== -1) {
d.setAttribute('checked', 'checked');
}
}
s.appendChild(d);
s.appendChild(document.createTextNode(r));
m.appendChild(s);
};
if (e.setDisplayOrder) {
$.each(e.setDisplayOrder, function (n, r) {
worker(r, e.setValues[r]);
});
} else {
$.each(e.setValues, worker);
}
d.appendChild(m);
break;
case 'customList':
d.style.textAlign = 'right';
d.style.paddingRight = '0.5em';
n = document.createElement('label');
n.setAttribute('for', e.name);
n.appendChild(document.createTextNode(e.label + ':'));
d.appendChild(n);
s.appendChild(d);
d = document.createElement('td');
d.style.paddingRight = '1em';
var b = document.createElement('button');
b.setAttribute('id', e.name);
b.setAttribute('name', e.name);
b.setAttribute('type', 'button');
b.addEventListener('click', K.display, false);
$(b).data({ value: p, pref: e });
b.appendChild(document.createTextNode('Edit items'));
d.appendChild(b);
break;
default:
alert(
'twinkleconfig: unknown data type for preference ' +
e.name
);
break;
}
s.appendChild(d);
d = document.createElement('td');
d.style.fontSize = '90%';
d.style.color = 'gray';
if (e.helptip) {
d.innerHTML = e.helptip.replace(
/{{(.+?)}}/g,
'{{<a href="' +
mw.util.getUrl('Template:') +
'$1" target="_blank">$1</a>}}'
);
}
if (e.type !== 'customList') {
var k = document.createElement('a');
k.setAttribute('href', '#tw-reset');
k.setAttribute('id', 'twinkle-config-reset-' + e.name);
k.addEventListener('click', Config.resetPrefLink, false);
k.style.cssFloat = 'right';
k.style.margin = '0 0.6em';
k.appendChild(document.createTextNode('Reset'));
d.appendChild(k);
}
s.appendChild(d);
v.appendChild(s);
return true;
});
return true;
});
var k = document.createElement('div');
k.setAttribute('id', 'twinkle-config-buttonpane');
k.style.backgroundColor = '#BCCADF';
k.style.padding = '0.5em';
var w = document.createElement('button');
w.setAttribute('id', 'twinkle-config-submit');
w.setAttribute('type', 'submit');
w.appendChild(document.createTextNode('Save changes'));
k.appendChild(w);
var C = document.createElement('span');
C.className = 'plainlinks';
C.style.marginLeft = '2.4em';
C.style.fontSize = '90%';
var A = document.createElement('a');
A.setAttribute('href', '#tw-reset-all');
A.setAttribute('id', 'twinkle-config-resetall');
A.addEventListener('click', Config.resetAllPrefs, false);
A.appendChild(document.createTextNode('Restore defaults'));
C.appendChild(A);
k.appendChild(C);
b.appendChild(k);
if (window.location.hash) {
var E = window.location.hash;
window.location.hash = '';
window.location.hash = E;
}
} else if (
mw.config.get('wgNamespaceNumber') ===
mw.config.get('wgNamespaceIds').user &&
mw.config.get('wgTitle').indexOf(mw.config.get('wgUserName')) ===
0 &&
mw.config.get('wgPageName').slice(-3) === '.js'
) {
var _ = document.createElement('div');
_.setAttribute('id', 'twinkle-config-headerbox');
var M,
N = mw.config
.get('wgPageName')
.slice(
mw.config.get('wgPageName').lastIndexOf('/') + 1,
mw.config.get('wgPageName').lastIndexOf('.js')
);
if (N === 'twinkleoptions') {
_.setAttribute('class', 'config-twopt-box');
if (mw.config.get('wgArticleId') > 0) {
_.appendChild(
document.createTextNode(
'This page contains your Twinkle preferences. You can change them using the '
)
);
} else {
_.appendChild(
document.createTextNode(
'You can customize Twinkle to suit your preferences by using the '
)
);
}
M = document.createElement('a');
M.setAttribute(
'href',
mw.util.getUrl(
mw.config.get('wgFormattedNamespaces')[
mw.config.get('wgNamespaceIds').project
] + ':Twinkle/Preferences'
)
);
M.appendChild(
document.createTextNode('Twinkle preferences panel')
);
_.appendChild(M);
_.appendChild(
document.createTextNode(', or by editing this page.')
);
$(_).insertAfter($('#contentSub'));
} else if (
[
'monobook',
'vector',
'cologneblue',
'modern',
'timeless',
'minerva',
'common',
].indexOf(N) !== -1
) {
_.setAttribute('class', 'config-userskin-box');
_.appendChild(
document.createTextNode(
'If you want to set Twinkle preferences, you can use the '
)
);
M = document.createElement('a');
M.setAttribute(
'href',
mw.util.getUrl(
mw.config.get('wgFormattedNamespaces')[
mw.config.get('wgNamespaceIds').project
] + ':Twinkle/Preferences'
)
);
M.appendChild(
document.createTextNode('Twinkle preferences panel')
);
_.appendChild(M);
_.appendChild(document.createTextNode('.'));
$(_).insertAfter($('#contentSub'));
}
}
};
Config.resetPrefLink = function (e) {
var n = e.target.id.substring(21);
obj_values(Config.sections).forEach(function (e) {
if (e.hidden || (e.adminOnly && !Morebits.userIsSysop)) {
return true;
}
var r = false;
e.preferences.forEach(function (e) {
if (e.name !== n) {
return true;
}
Config.resetPref(e);
r = true;
return false;
});
if (r) {
return false;
}
});
return false;
};
Config.resetPref = function (e) {
switch (e.type) {
case 'boolean':
document.getElementById(e.name).checked = Z[e.name];
break;
case 'string':
case 'integer':
case 'enum':
document.getElementById(e.name).value = Z[e.name];
break;
case 'set':
$.each(e.setValues, function (n) {
var r = document.getElementById(e.name + '_' + n);
if (r) {
r.checked = Z[e.name].indexOf(n) !== -1;
}
});
break;
case 'customList':
$(document.getElementById(e.name)).data('value', Z[e.name]);
break;
default:
alert(
'twinkleconfig: unknown data type for preference ' + e.name
);
break;
}
};
Config.resetAllPrefs = function () {
obj_values(Config.sections).forEach(function (e) {
if (e.hidden || (e.adminOnly && !Morebits.userIsSysop)) {
return true;
}
e.preferences.forEach(function (e) {
if (!e.adminOnly || Morebits.userIsSysop) {
Config.resetPref(e);
}
});
return true;
});
return false;
};
Config.save = function (e) {
Morebits.status.init(
document.getElementById('twinkle-config-content')
);
var n =
mw.config.get('wgFormattedNamespaces')[
mw.config.get('wgNamespaceIds').user
] +
':' +
mw.config.get('wgUserName') +
'/twinkleoptions.js';
var r = new Morebits.wiki.page(n, 'Saving preferences to ' + n);
r.setCallbackParameters(e.target);
r.load(Config.writePrefs);
return false;
};
Config.writePrefs = function (e) {
var n = e.getCallbackParameters();
var r = { optionsVersion: 2.1 };
var compare = function (e, n) {
if (Array.isArray(e)) {
if (e.length !== n.length) {
return false;
}
var r = e.sort(),
s = n.sort();
for (var d = 0; r[d]; ++d) {
if (
typeof r[d] === 'object' &&
(r[d].label !== s[d].label || r[d].value !== s[d].value)
) {
return false;
} else if (r[d].toString() !== s[d].toString()) {
return false;
}
}
return true;
}
return e === n;
};
obj_values(Config.sections).forEach(function (e) {
if (e.adminOnly && !Morebits.userIsSysop) {
return;
}
e.preferences.forEach(function (s) {
var d;
if (!s.adminOnly || Morebits.userIsSysop) {
if (!e.hidden) {
switch (s.type) {
case 'boolean':
d = n[s.name].checked;
break;
case 'string':
case 'enum':
d = n[s.name].value;
break;
case 'integer':
d = parseInt(n[s.name].value, 10);
if (isNaN(d)) {
Morebits.status.warn(
'Saving',
'The value you specified for ' +
s.name +
' (' +
n[s.name].value +
') was invalid. The save will continue, but the invalid data value will be skipped.'
);
d = null;
}
break;
case 'set':
d = [];
if (s.setDisplayOrder) {
$.each(s.setDisplayOrder, function (e, r) {
if (n[s.name + '_' + r].checked) {
d.push(r);
}
});
} else {
$.each(s.setValues, function (e) {
if (n[s.name + '_' + e].checked) {
d.push(e);
}
});
}
break;
case 'customList':
d = $(n[s.name]).data('value');
break;
default:
alert(
'twinkleconfig: unknown data type for preference ' +
s.name
);
break;
}
} else if (X) {
d = X[s.name];
}
}
if (d !== undefined && !compare(d, Z[s.name])) {
r[s.name] = d;
}
});
});
var s =
'// twinkleoptions.js: personal Twinkle preferences file\n' +
'//\n' +
'// NOTE: The easiest way to change your Twinkle preferences is by using the\n' +
'// Twinkle preferences panel, at [[' +
Morebits.pageNameNorm +
']].\n' +
'//\n' +
'// This file is AUTOMATICALLY GENERATED. Any changes you make (aside from\n' +
'// changing the configuration parameters in a valid-JavaScript way) will be\n' +
'// overwritten the next time you click "save" in the Twinkle preferences\n' +
'// panel. If modifying this file, make sure to use correct JavaScript.\n' +
'// <no' +
'wiki>\n' +
'\n' +
'window.Twinkle.prefs = ';
s += JSON.stringify(r, null, 2);
s +=
';\n' +
'\n' +
'// </no' +
'wiki>\n' +
'// End of twinkleoptions.js\n';
e.setPageText(s);
e.setEditSummary(
'Saving Twinkle preferences: automatic edit from [[:' +
Morebits.pageNameNorm +
']]'
);
e.setChangeTags(d.changeTags);
e.setCreateOption('recreate');
e.save(Config.saveSuccess);
};
Config.saveSuccess = function (e) {
e.getStatusElement().info('successful');
var n = document.createElement('div');
n.className = 'successbox';
n.style.fontSize = '100%';
n.style.marginTop = '2em';
n.innerHTML =
'<p><b>Your Twinkle preferences have been saved.</b></p><p>To see the changes, you will need to <b>clear your browser cache entirely</b> (see <a href="' +
mw.util.getUrl('WP:BYPASS') +
'" title="WP:BYPASS">WP:BYPASS</a> for instructions).</p>';
Morebits.status.root.appendChild(n);
var r = document.createElement('br');
r.style.clear = 'both';
Morebits.status.root.appendChild(r);
};
Config.sections = {
general: {
title: 'General',
module: 'general',
preferences: [
{
name: 'userTalkPageMode',
label: 'When opening a user talk page, open it',
type: 'enum',
enumValues: {
window: 'In a window, replacing other user talks',
tab: 'In a new tab',
blank: 'In a totally new window',
},
default: 'tab',
},
{
name: 'dialogLargeFont',
label: 'Use larger text in Twinkle dialogs',
type: 'boolean',
default: false,
},
{
name: 'disabledModules',
label: 'Turn off the selected Twinkle modules',
helptip:
'Anything you select here will NOT be available for use, so act with care. Uncheck to reactivate.',
type: 'set',
setValues: {
arv: 'ARV',
warn: 'Warn',
welcome: 'Welcome',
shared: 'Shared IP',
talkback: 'Talkback',
speedy: 'CSD',
prod: 'PROD',
xfd: 'XfD',
image: 'Image (DI)',
protect: 'Protect (RPP)',
tag: 'Tag',
diff: 'Diff',
unlink: 'Unlink',
fluff: 'Revert and rollback',
},
default: [],
},
{
name: 'disabledSysopModules',
label: 'Turn off the selected admin-only modules',
helptip:
'Anything you select here will NOT be available for use, so act with care. Uncheck to reactivate.',
adminOnly: true,
type: 'set',
setValues: {
block: 'Block',
deprod: 'DePROD',
batchdelete: 'D-batch',
batchprotect: 'P-batch',
batchundelete: 'Und-batch',
},
default: [],
},
],
},
hidden: {
title: 'Hidden',
hidden: true,
preferences: [
{ name: 'portletArea', type: 'string' },
{ name: 'portletId', type: 'string' },
{ name: 'portletName', type: 'string' },
{ name: 'portletType', type: 'string' },
{ name: 'portletNext', type: 'string' },
{ name: 'revertMaxRevisions', type: 'integer', default: 50 },
{ name: 'autolevelStaleDays', type: 'integer', default: 3 },
{
name: 'batchMax',
type: 'integer',
adminOnly: true,
default: 5e3,
},
{
name: 'batchChunks',
type: 'integer',
adminOnly: true,
default: 50,
},
],
},
};
Config.watchlistEnums = {
yes: 'Add to watchlist (indefinitely)',
no: "Don't add to watchlist",
default: 'Follow your site preferences',
'1 week': 'Watch for 1 week',
'1 month': 'Watch for 1 month',
'3 months': 'Watch for 3 months',
'6 months': 'Watch for 6 months',
};
Config.commonSets = {
csdCriteria: {
db: 'Custom rationale ({{db}})',
g1: 'G1',
g2: 'G2',
g3: 'G3',
g4: 'G4',
g5: 'G5',
g6: 'G6',
g7: 'G7',
g8: 'G8',
g10: 'G10',
g11: 'G11',
g12: 'G12',
g13: 'G13',
g14: 'G14',
a1: 'A1',
a2: 'A2',
a3: 'A3',
a5: 'A5',
a7: 'A7',
a9: 'A9',
a10: 'A10',
a11: 'A11',
u1: 'U1',
u2: 'U2',
u3: 'U3',
u5: 'U5',
f1: 'F1',
f2: 'F2',
f3: 'F3',
f7: 'F7',
f8: 'F8',
f9: 'F9',
f10: 'F10',
c1: 'C1',
r2: 'R2',
r3: 'R3',
r4: 'R4',
p1: 'P1',
p2: 'P2',
},
csdCriteriaDisplayOrder: [
'db',
'g1',
'g2',
'g3',
'g4',
'g5',
'g6',
'g7',
'g8',
'g10',
'g11',
'g12',
'g13',
'g14',
'a1',
'a2',
'a3',
'a5',
'a7',
'a9',
'a10',
'a11',
'u1',
'u2',
'u3',
'u5',
'f1',
'f2',
'f3',
'f7',
'f8',
'f9',
'f10',
'c1',
'r2',
'r3',
'r4',
'p1',
'p2',
],
csdCriteriaNotification: {
db: 'Custom rationale ({{db}})',
g1: 'G1',
g2: 'G2',
g3: 'G3',
g4: 'G4',
g6: 'G6 ("copy-paste move" only)',
g10: 'G10',
g11: 'G11',
g12: 'G12',
g13: 'G13',
g14: 'G14',
a1: 'A1',
a2: 'A2',
a3: 'A3',
a5: 'A5',
a7: 'A7',
a9: 'A9',
a10: 'A10',
a11: 'A11',
u3: 'U3',
u5: 'U5',
f1: 'F1',
f2: 'F2',
f3: 'F3',
f7: 'F7',
f9: 'F9',
f10: 'F10',
c1: 'C1',
r2: 'R2',
r3: 'R3',
r4: 'R4',
p1: 'P1',
p2: 'P2',
},
csdCriteriaNotificationDisplayOrder: [
'db',
'g1',
'g2',
'g3',
'g4',
'g6',
'g10',
'g11',
'g12',
'g13',
'g14',
'a1',
'a2',
'a3',
'a5',
'a7',
'a9',
'a10',
'a11',
'u3',
'u5',
'f1',
'f2',
'f3',
'f7',
'f9',
'f10',
'c1',
'r2',
'r3',
'r4',
'p1',
'p2',
],
csdAndDICriteria: {
db: 'Custom rationale ({{db}})',
g1: 'G1',
g2: 'G2',
g3: 'G3',
g4: 'G4',
g5: 'G5',
g6: 'G6',
g7: 'G7',
g8: 'G8',
g10: 'G10',
g11: 'G11',
g12: 'G12',
g13: 'G13',
g14: 'G14',
a1: 'A1',
a2: 'A2',
a3: 'A3',
a5: 'A5',
a7: 'A7',
a9: 'A9',
a10: 'A10',
a11: 'A11',
u1: 'U1',
u2: 'U2',
u3: 'U3',
u5: 'U5',
f1: 'F1',
f2: 'F2',
f3: 'F3',
f4: 'F4',
f5: 'F5',
f6: 'F6',
f7: 'F7',
f8: 'F8',
f9: 'F9',
f10: 'F10',
f11: 'F11',
c1: 'C1',
r2: 'R2',
r3: 'R3',
r4: 'R4',
p1: 'P1',
p2: 'P2',
},
csdAndDICriteriaDisplayOrder: [
'db',
'g1',
'g2',
'g3',
'g4',
'g5',
'g6',
'g7',
'g8',
'g10',
'g11',
'g12',
'g13',
'g14',
'a1',
'a2',
'a3',
'a5',
'a7',
'a9',
'a10',
'a11',
'u1',
'u2',
'u3',
'u5',
'f1',
'f2',
'f3',
'f4',
'f5',
'f6',
'f7',
'f8',
'f9',
'f10',
'f11',
'c1',
'r2',
'r3',
'r4',
'p1',
'p2',
],
namespacesNoSpecial: {
0: 'Article',
1: 'Talk (article)',
2: 'User',
3: 'User talk',
4: 'Wikipedia',
5: 'Wikipedia talk',
6: 'File',
7: 'File talk',
8: 'MediaWiki',
9: 'MediaWiki talk',
10: 'Template',
11: 'Template talk',
12: 'Help',
13: 'Help talk',
14: 'Category',
15: 'Category talk',
100: 'Portal',
101: 'Portal talk',
108: 'Book',
109: 'Book talk',
118: 'Draft',
119: 'Draft talk',
710: 'TimedText',
711: 'TimedText talk',
828: 'Module',
829: 'Module talk',
},
};
return Config;
})();
var K = (function () {
function ListDialog() {}
ListDialog.addRow = function (e, n, r) {
var s = document.createElement('tr');
var d = document.createElement('td');
var p = document.createElement('button');
p.setAttribute('type', 'button');
p.addEventListener(
'click',
function () {
$(s).remove();
},
false
);
p.textContent = 'Remove';
d.appendChild(p);
s.appendChild(d);
d = document.createElement('td');
var g = document.createElement('input');
g.setAttribute('type', 'text');
g.className = 'twinkle-config-customlist-value';
g.style.width = '97%';
if (n) {
g.setAttribute('value', n);
}
d.appendChild(g);
s.appendChild(d);
d = document.createElement('td');
g = document.createElement('input');
g.setAttribute('type', 'text');
g.className = 'twinkle-config-customlist-label';
g.style.width = '98%';
if (r) {
g.setAttribute('value', r);
}
d.appendChild(g);
s.appendChild(d);
e.appendChild(s);
};
ListDialog.display = function (e) {
var n = $(e.target);
var r = n.data('value');
var s = n.data('pref');
var d = new Morebits.simpleWindow(720, 400);
d.setTitle(s.label);
d.setScriptName('Twinkle preferences');
var p = document.createElement('div');
var g = document.createElement('table');
g.className = 'wikitable';
g.style.margin = '1.4em 1em';
g.style.width = 'auto';
var m = document.createElement('tbody');
var b = document.createElement('tr');
var v = document.createElement('th');
v.style.width = '5%';
b.appendChild(v);
v = document.createElement('th');
v.style.width = '35%';
v.textContent = s.customListValueTitle
? s.customListValueTitle
: 'Value';
b.appendChild(v);
v = document.createElement('th');
v.style.width = '60%';
v.textContent = s.customListLabelTitle
? s.customListLabelTitle
: 'Label';
b.appendChild(v);
m.appendChild(b);
var k = false;
$.each(r, function (e, n) {
k = true;
ListDialog.addRow(m, n.value, n.label);
});
if (!k) {
ListDialog.addRow(m);
}
var w = document.createElement('tfoot');
b = document.createElement('tr');
var C = document.createElement('td');
C.setAttribute('colspan', '3');
var A = document.createElement('button');
A.style.minWidth = '8em';
A.setAttribute('type', 'button');
A.addEventListener(
'click',
function () {
ListDialog.addRow(m);
},
false
);
A.textContent = 'Add';
C.appendChild(A);
b.appendChild(C);
w.appendChild(b);
g.appendChild(m);
g.appendChild(w);
p.appendChild(g);
var E = document.createElement('button');
E.setAttribute('type', 'submit');
E.addEventListener(
'click',
function () {
ListDialog.save(n, m);
d.close();
},
false
);
E.textContent = 'Save changes';
p.appendChild(E);
E = document.createElement('button');
E.setAttribute('type', 'submit');
E.addEventListener(
'click',
function () {
ListDialog.reset(n, m);
},
false
);
E.textContent = 'Reset';
p.appendChild(E);
E = document.createElement('button');
E.setAttribute('type', 'submit');
E.addEventListener(
'click',
function () {
d.close();
},
false
);
E.textContent = 'Cancel';
p.appendChild(E);
d.setContent(p);
d.display();
};
ListDialog.reset = function (e, n) {
var r = $(e);
var s = r.data('pref');
var d = r.data('value');
J.resetPref(s);
var p = $(n);
p.find('tr').slice(1).remove();
var g = r.data('value');
$.each(g, function (e, r) {
ListDialog.addRow(n, r.value, r.label);
});
r.data('value', d);
};
ListDialog.save = function (e, n) {
var r = [];
var s = {};
$(n)
.find('input[type="text"]')
.each(function (e, n) {
if ($(n).hasClass('twinkle-config-customlist-value')) {
s = { value: n.value };
} else {
s.label = n.value;
if (s.value || s.label) {
r.push(s);
}
}
});
$(e).data('value', r);
};
return ListDialog;
})();
function setPortletConfig() {
switch (mw.config.get('skin')) {
case 'vector':
setDefaultConfig([
{ name: 'portletArea', value: 'right-navigation' },
{ name: 'portletId', value: 'p-twinkle' },
{ name: 'portletName', value: 'TW' },
{ name: 'portletType', value: 'menu' },
{ name: 'portletNext', value: 'p-search' },
]);
break;
case 'timeless':
setDefaultConfig([
{ name: 'portletArea', value: '#page-tools .sidebar-inner' },
{ name: 'portletId', value: 'p-twinkle' },
{ name: 'portletName', value: 'Twinkle' },
{ name: 'portletType', value: null },
{ name: 'portletNext', value: 'p-userpagetools' },
]);
break;
default:
setDefaultConfig([
{ name: 'portletArea', value: null },
{ name: 'portletId', value: 'p-cactions' },
{ name: 'portletName', value: null },
{ name: 'portletType', value: null },
{ name: 'portletNext', value: null },
]);
}
}
function addPortletLink(e, n, r, s) {
if (getPref('portletArea') !== null) {
addPortlet(
getPref('portletArea'),
getPref('portletId'),
getPref('portletName'),
getPref('portletType'),
getPref('portletNext')
);
}
var d = mw.util.addPortletLink(
getPref('portletId'),
typeof e === 'string' ? e : '#',
n,
r,
s
);
$('.client-js .skin-vector #p-cactions').css('margin-right', 'initial');
if (typeof e === 'function') {
$(d).click(function (n) {
e();
n.preventDefault();
});
}
if ($.collapsibleTabs) {
$.collapsibleTabs.handleResize();
}
return d;
}
function addPortlet(e, n, r, s, d) {
var p = document.getElementById(e) || document.querySelector(e);
if (!p) {
return null;
}
var g = document.getElementById(n);
if (g) {
if (g.parentNode && g.parentNode === p) {
return g;
}
return null;
}
var m;
if (d) {
m = document.getElementById(d);
}
var b = mw.config.get('skin');
if (
b !== 'vector' ||
(e !== 'left-navigation' && e !== 'right-navigation')
) {
s = null;
}
var v, k;
switch (b) {
case 'vector':
if (
e !== 'portal' &&
e !== 'left-navigation' &&
e !== 'right-navigation'
) {
e = 'mw-panel';
}
v =
'mw-portlet vector-menu vector-menu-' +
(e === 'mw-panel'
? 'portal'
: s === 'menu'
? 'dropdown vector-menu-dropdown-noicon'
: 'tabs');
k = 'vector-menu-content';
break;
case 'modern':
if (e !== 'mw_portlets' && e !== 'mw_contentwrapper') {
e = 'mw_portlets';
}
v = 'portlet';
break;
case 'timeless':
v = 'mw-portlet';
k = 'mw-portlet-body';
break;
default:
e = 'column-one';
v = 'portlet';
break;
}
var w = document.createElement('nav');
w.setAttribute('aria-labelledby', n + '-label');
w.className = v + ' emptyPortlet';
w.id = n;
if (m && m.parentNode === p) {
p.insertBefore(w, m);
} else {
p.appendChild(w);
}
var C = document.createElement('h3');
C.id = n + '-label';
var A = document.createElement('ul');
if (b === 'vector') {
A.className = 'vector-menu-content-list';
if (v.indexOf('vector-menu-dropdown') !== -1) {
var E = document.createElement('input');
E.className = 'vector-menu-checkbox';
E.setAttribute('type', 'checkbox');
E.setAttribute('aria-labelledby', n + '-label');
w.appendChild(E);
var _ = document.createElement('span');
_.appendChild(document.createTextNode(r));
C.appendChild(_);
var M = document.createElement('a');
M.href = '#';
$(M).click(function (e) {
e.preventDefault();
});
C.appendChild(M);
}
} else {
C.appendChild(document.createTextNode(r));
}
w.appendChild(C);
if (k) {
var N = document.createElement('div');
N.className = k;
N.appendChild(A);
w.appendChild(N);
} else {
w.appendChild(A);
}
return w;
}
var Q = (function () {
function TwinkleModule() {}
TwinkleModule.userPreferences = function () {};
TwinkleModule.prototype.addPreference = function (e) {
J.addPreference(this.moduleName, e);
};
TwinkleModule.prototype.addMenu = function () {
var e = this;
addPortletLink(
function () {
return e.makeWindow();
},
this.portletName,
this.portletId || 'twinkle-' + this.moduleName.toLowerCase(),
this.portletTooltip
);
};
TwinkleModule.prototype.makeWindow = function () {};
return TwinkleModule;
})();
function registerModule(e) {
var n = e.userPreferences();
if (n) {
J.addGroup(e.moduleName, N(N({}, n), { module: e.moduleName }));
setDefaultConfig(
n.preferences.map(function (e) {
return { name: e.name, value: e.default };
})
);
}
if (!ee.includes(e.moduleName)) {
d[e.moduleName.toLowerCase()] = new e();
}
}
var ee = [];
function init() {
if (
mw.config.get('wgNamespaceNumber') === -1 &&
!d.activeSpecialPages.includes(
mw.config.get('wgCanonicalSpecialPageName')
)
) {
return;
}
if (window.top !== window.self) {
return;
}
setPortletConfig();
Morebits.l10n.redirectTagAliases = _.redirectTagAliases;
if (typeof _.signatureTimestampFormat === 'function') {
Morebits.l10n.signatureTimestampFormat = _.signatureTimestampFormat;
}
initialiseMwApi();
d.preModuleInitHooks.push(
function () {
initMessaging();
},
function () {
return loadUserConfig().then(function () {
if (getPref('dialogLargeFont')) {
mw.util.addCSS(
'.morebits-dialog-content, .morebits-dialog-footerlinks { font-size: 100% !important; } ' +
'.morebits-dialog input, .morebits-dialog select, .morebits-dialog-content button { font-size: inherit !important; }'
);
}
ee = ee.concat(
getPref('disabledModules'),
getPref('disabledSysopModules')
);
return Promise.all(
d.preModuleInitHooksWithConfig.map(function (e) {
return e();
})
);
});
}
);
Promise.all(
d.preModuleInitHooks.map(function (e) {
return e();
})
).then(function () {
mw.hook('twinkle.preModuleInit').fire();
for (var e = 0, n = d.registeredModules; e < n.length; e++) {
var r = n[e];
registerModule(r);
}
if (
mw.config.get('skin') === 'vector' &&
getPref('portletType') === 'menu' &&
$('#p-twinkle').length === 0
) {
$('#p-cactions').css('margin-right', 'initial');
}
J.init();
});
}
var te = JSON.parse(
'{"@comment":"This file contains project-specific overrides for twinkle-core messages."}'
);
var ne = [];
var re = (function (e) {
__extends(Fluff, e);
function Fluff() {
var n = e.call(this) || this;
n.moduleName = 'fluff';
n.skipTalk = null;
n.rollbackInPlace = null;
n.flaggedRevsEnabled =
!!mw.loader.moduleRegistry['ext.flaggedRevs.basic'];
n.linkBuilder = {
spanTag: function (e, n) {
var r = document.createElement('span');
r.style.color = e;
r.appendChild(document.createTextNode(n));
return r;
},
buildLink: function (e, r) {
var s = document.createElement('a');
s.appendChild(n.linkBuilder.spanTag('Black', '['));
s.appendChild(n.linkBuilder.spanTag(e, r));
s.appendChild(n.linkBuilder.spanTag('Black', ']'));
s.href = '#';
return s;
},
rollbackLinks: function (e, r, s, d) {
if (r === void 0) {
r = false;
}
e = e || null;
var p = r ? 'span' : 'div';
var g = document.createElement(p);
s = parseInt(s, 10);
if (s) {
g.setAttribute('id', 'tw-revert' + s);
} else {
g.setAttribute('id', 'tw-revert');
}
var m = document.createElement('strong');
var b = document.createElement('strong');
var v = n.linkBuilder.buildLink(
'SteelBlue',
msg('link-rollback')
);
var k = n.linkBuilder.buildLink('Red', msg('link-vandalism'));
$(v).click(function () {
n.revert('norm', e, s, d);
n.disableLinks(g);
});
$(k).click(function () {
n.revert('vand', e, s, d);
n.disableLinks(g);
});
b.appendChild(k);
m.appendChild(v);
var w = r ? ' ' : ' || ';
if (!r) {
var C = document.createElement('strong');
var A = n.linkBuilder.buildLink(
'DarkOliveGreen',
msg('link-goodfaith-rollback')
);
$(A).click(function () {
n.revert('agf', e, s, d);
});
C.appendChild(A);
g.appendChild(C);
}
g.appendChild(document.createTextNode(w));
g.appendChild(m);
g.appendChild(document.createTextNode(w));
g.appendChild(b);
return g;
},
restoreThisRevisionLink: function (e, r) {
if (r === void 0) {
r = false;
}
e = typeof e === 'number' ? e : mw.config.get(e);
var s = r ? 'span' : 'div';
var d = document.createElement(s);
d.setAttribute('id', 'tw-revert-to-' + e);
d.style.fontWeight = 'bold';
var p = n.linkBuilder.buildLink(
'SaddleBrown',
msg('restore-revision')
);
$(p).click(function () {
n.revertToRevision(e);
});
if (r) {
d.appendChild(document.createTextNode(' '));
}
d.appendChild(p);
return d;
},
};
n.addLinks = {
contributions: function () {
var e = !!$('#sp-contributions-footer-anon-range')[0];
if (mw.config.exists('wgRelevantUserName') || e) {
var r = mw.config.get('wgRelevantUserName');
if (
getPref('showRollbackLinks').indexOf('contribs') !== -1 ||
(mw.config.get('wgUserName') !== r &&
getPref('showRollbackLinks').indexOf('others') !== -1) ||
(mw.config.get('wgUserName') === r &&
getPref('showRollbackLinks').indexOf('mine') !== -1)
) {
var s = $('#mw-content-text').find(
'ul li:has(span.mw-uctop):has(.mw-changeslist-diff)'
);
s.each(function (s, d) {
var p = $(d).find('.mw-contributions-title').text();
if (e) {
r = $(d)
.find('.mw-userlink:not(.history-deleted)')
.text();
}
d.appendChild(
n.linkBuilder.rollbackLinks(r, true, d.dataset.mwRevid, p)
);
});
}
}
},
recentchanges: function () {
if (getPref('showRollbackLinks').indexOf('recent') !== -1) {
var e = $(
'.mw-changeslist .mw-changeslist-last.mw-changeslist-src-mw-edit'
);
e = e
.not('.mw-rcfilters-ui-highlights-enhanced-toplevel')
.find('.mw-changeslist-line-inner, td.mw-enhanced-rc-nested');
e.each(function (e, r) {
var s = $(r)
.find('.mw-userlink:not(.history-deleted)')
.text();
var d = $(r).find('.mw-changeslist-diff').attr('href');
var p = mw.util.getParamValue('diff', d);
var g = r.dataset.targetPage;
r.appendChild(n.linkBuilder.rollbackLinks(s, true, p, g));
});
}
},
history: function () {
if (getPref('showRollbackLinks').indexOf('history') !== -1) {
var e = $('#pagehistory li').toArray();
if (!$('.mw-firstlink').length) {
var r = e.shift();
var s = $(r)
.find('.mw-userlink:not(.history-deleted)')
.text();
for (var d = 0; d < e.length; d++) {
if ($(e[d]).find('.mw-userlink').text() !== s) {
r.appendChild(n.linkBuilder.rollbackLinks(s, true));
break;
}
}
}
e.forEach(function (e) {
var r = e.querySelector('.mw-changeslist-date').href;
var s = parseInt(mw.util.getParamValue('oldid', r), 10);
if (!isNaN(s)) {
e.appendChild(
n.linkBuilder.restoreThisRevisionLink(s, true)
);
}
});
}
},
diff: function () {
var warnFromTalk = function (e) {
var n = $('#mw-diff-' + e + '2 .mw-usertoollinks a').first();
if (n.length) {
var r =
'vanarticle=' +
mw.util.rawurlencode(Morebits.pageNameNorm) +
'&' +
'noautowarn=true';
r += '&vanarticlerevid=';
r +=
e === 'otitle'
? mw.config.get('wgDiffOldId')
: mw.config.get('wgDiffNewId');
var s = n.attr('href');
if (s.indexOf('?') === -1) {
n.attr('href', s + '?' + r);
} else {
n.attr('href', s + '&' + r);
}
}
};
warnFromTalk('otitle');
if (
mw.config.get('wgDiffOldId') &&
mw.config.get('wgDiffOldId') !== mw.config.get('wgDiffNewId')
) {
var e = document.getElementById('mw-diff-otitle1').parentNode;
e.insertBefore(
n.linkBuilder.restoreThisRevisionLink('wgDiffOldId'),
e.firstChild
);
}
warnFromTalk('ntitle');
if (document.getElementById('differences-nextlink')) {
var r = document.getElementById('mw-diff-ntitle1').parentNode;
r.insertBefore(
n.linkBuilder.restoreThisRevisionLink('wgDiffNewId'),
r.firstChild
);
} else if (
getPref('showRollbackLinks').indexOf('diff') !== -1 &&
mw.config.get('wgDiffOldId') &&
(mw.config.get('wgDiffOldId') !==
mw.config.get('wgDiffNewId') ||
document.getElementById('differences-prevlink'))
) {
var s =
$('#mw-diff-ntitle2').find('.mw-userlink')[0].textContent;
var d = document.getElementById('mw-diff-ntitle1').parentNode;
d.insertBefore(n.linkBuilder.rollbackLinks(s), d.firstChild);
}
},
oldid: function () {
var e = document.getElementById('mw-revision-info').parentNode;
e.insertBefore(
n.linkBuilder.restoreThisRevisionLink('wgRevisionId'),
e.firstChild
);
},
};
n.callbacks = {
toRevision: function (e) {
var r = prompt(msg('prompt-reason-restore'), '');
if (r === null) {
e.getStatusElement().error(msg('user-aborted'));
return;
}
var s = n.formatSummary(
msg('restore-summary', e.getRevisionID()),
e.getRevisionUser(),
r
);
e.setChangeTags(d.changeTags);
e.setEditSummary(s);
if (getPref('watchRevertedPages').indexOf('torev') !== -1) {
e.setWatchlist(getPref('watchRevertedExpiry'));
}
if (getPref('markRevertedPagesAsMinor').indexOf('torev') !== -1) {
e.setMinorEdit(true);
}
Morebits.wiki.actionCompleted.redirect = e.getPageName();
Morebits.wiki.actionCompleted.notice = msg('reversion-complete');
e.revert();
},
main: function (e) {
var r = e.getResponse().query.pages[0];
if (!r.actions.edit) {
e.statelem.error(msg('cant-edit-protected'));
return;
}
var s = e.statelem;
var p = e.params;
var g = parseInt(r.lastrevid, 10);
var m = r.revisions;
if (m.length < 1) {
s.error(msg('no-revisions'));
return;
}
var b = m[0];
var v = b.user;
if (g < p.revid) {
Morebits.status.error('Error', msg('bad-revid', g));
return;
}
var k = p.user || msg('hidden-user');
var w = 1;
if (p.revid !== g) {
Morebits.status.warn(
'Warning',
msg('revid-mismatch', g, p.revid)
);
if (
v === p.user ||
(mw.util.isIPv6Address(p.user) &&
Morebits.ip.get64(v) === Morebits.ip.get64(p.user))
) {
switch (p.type) {
case 'vand':
if (v !== p.user) {
Morebits.status.info(
'Info',
msg('latest-rev-same-64', k)
);
} else {
Morebits.status.info(
'Info',
msg('latest-rev-same-user', k)
);
}
break;
case 'agf':
Morebits.status.warn(
'Warning',
msg('latest-rev-other-user-goodfaith', k)
);
return;
default:
Morebits.status.warn(
'Notice',
msg('latest-rev-other-user', k)
);
return;
}
} else if (
p.type === 'vand' &&
n.trustedBots.indexOf(b.user) !== -1 &&
m.length > 1 &&
m[1].revid === p.revid
) {
Morebits.status.info('Info', msg('latest-rev-bot', v));
w = 2;
} else {
Morebits.status.error('Error', msg('latest-rev-reverted', v));
return;
}
} else {
p.user = v;
k = p.user || msg('hidden-user');
}
if (n.trustedBots.indexOf(p.user) !== -1) {
switch (p.type) {
case 'vand':
Morebits.status.info('Info', msg('bot-revert', k));
w = 2;
p.user = m[1].user;
p.userHidden = !!m[1].userhidden;
break;
case 'agf':
Morebits.status.warn(
'Notice',
msg('bot-revert-goodfaith', k)
);
return;
case 'norm':
default:
var C = confirm(msg('bot-revert-prompt'));
if (C) {
Morebits.status.info(
'Info',
msg('bot-revert-previous', k)
);
w = 2;
p.user = m[1].user;
p.userHidden = !!m[1].userhidden;
k = p.user || msg('hidden-user');
} else {
Morebits.status.warn(
'Notice',
msg('bot-revert-selected', k)
);
}
break;
}
}
var A = false;
var $ = 0;
var E = false;
for (var _ = w; _ < m.length; ++_) {
++$;
if (m[_].user !== p.user) {
if (
mw.util.isIPv6Address(m[_].user) &&
Morebits.ip.get64(m[_].user) === Morebits.ip.get64(p.user)
) {
if (!E) {
new Morebits.status('Note', msg('ipv6-same-user'));
E = true;
}
continue;
}
A = _;
break;
}
}
if (!A) {
s.error(
msg('no-previous-revision', k, getPref('revertMaxRevisions'))
);
return;
}
if (!$) {
Morebits.status.error('Error', msg('no-edits-revert'));
return;
}
var M = m[A];
var N = false;
if (p.type !== 'vand' && $ > 1) {
if (!confirm(msg('revert-multiple-prompt', k, $))) {
Morebits.status.info('Notice', msg('stopping'));
return;
}
N = true;
}
p.count = $;
p.goodid = M.revid;
p.gooduser = M.user;
p.gooduserHidden = !!M.userhidden;
s.status(
msg(
'revision-age',
p.goodid,
$,
p.gooduserHidden ? msg('hidden-user') : p.gooduser
)
);
var I, R;
switch (p.type) {
case 'agf':
R = prompt(msg('summary-prompt'), '');
if (R === null) {
s.error(msg('user-aborted'));
return;
}
N = true;
I = n.formatSummary(
msg('goodfaith-summary'),
p.userHidden ? null : p.user,
R
);
break;
case 'vand':
I = n.formatSummary(
msg(
'vandalism-summary',
p.count,
p.gooduserHidden ? msg('hidden-user') : p.gooduser
),
p.userHidden ? null : p.user
);
break;
case 'norm':
default:
if (getPref('offerReasonOnNormalRevert')) {
R = prompt(msg('summary-prompt'), '');
if (R === null) {
s.error(msg('user-aborted'));
return;
}
N = true;
}
I = n.formatSummary(
msg('normal-summary', p.count),
p.userHidden ? null : p.user,
R
);
break;
}
if (
(getPref('confirmOnFluff') ||
(getPref('confirmOnMobileFluff') &&
/Android|webOS|iPhone|iPad|iPod|BlackBerry|Mobile|Opera Mini/i.test(
navigator.userAgent
))) &&
!N &&
!confirm(msg('revert-confirm'))
) {
s.error(msg('user-aborted'));
return;
}
if (
!n.skipTalk &&
getPref('openTalkPage').indexOf(p.type) !== -1 &&
!p.userHidden &&
mw.config.get('wgUserName') !== p.user
) {
p.notifyUser = true;
p.vantimestamp = b.timestamp;
}
if (
n.flaggedRevsEnabled &&
(Morebits.userIsInGroup('reviewer') || Morebits.userIsSysop) &&
!!r.flagged &&
r.flagged.stable_revid >= p.goodid &&
!!r.flagged.pending_since
) {
p.reviewRevert = true;
p.csrftoken = e.getResponse().query.tokens.csrftoken;
}
var S = new Morebits.wiki.page(
p.pagename,
msg('saving-reverted')
);
S.setEditSummary(I);
S.setChangeTags(d.changeTags);
S.setOldID(p.goodid);
S.setCallbackParameters(p);
if (getPref('watchRevertedPages').indexOf(p.type) !== -1) {
S.setWatchlist(getPref('watchRevertedExpiry'));
}
if (getPref('markRevertedPagesAsMinor').indexOf(p.type) !== -1) {
S.setMinorEdit(true);
}
if (!n.rollbackInPlace) {
Morebits.wiki.actionCompleted.redirect = p.pagename;
}
Morebits.wiki.actionCompleted.notice = msg('revert-complete');
S.revert(n.callbacks.complete);
},
complete: function (e) {
var n = e.getCallbackParameters();
if (n.notifyUser && !n.userHidden) {
Morebits.status.info('Info', msg('opening-talk', n.user));
var r = {
title: 'User talk:' + n.user,
action: 'edit',
preview: 'yes',
vanarticle: n.pagename.replace(/_/g, ' '),
vanarticlerevid: n.revid,
vantimestamp: n.vantimestamp,
vanarticlegoodrevid: n.goodid,
type: n.type,
count: n.count,
};
switch (getPref('userTalkPageMode')) {
case 'tab':
window.open(mw.util.getUrl('', r), '_blank');
break;
case 'blank':
window.open(
mw.util.getUrl('', r),
'_blank',
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes,width=1200,height=800'
);
break;
case 'window':
default:
window.open(
mw.util.getUrl('', r),
window.name === 'twinklewarnwindow'
? '_blank'
: 'twinklewarnwindow',
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes,width=1200,height=800'
);
break;
}
}
if (n.reviewRevert) {
var s = {
action: 'review',
revid: e.getSaveResponse().edit.newrevid,
token: n.csrftoken,
comment: msg('pcreview-comment') + d.summaryAd,
};
var p = new Morebits.wiki.api(msg('pcreview-accepting'), s);
p.post();
}
},
};
if (mw.config.get('wgIsProbablyEditable')) {
if (mw.config.get('wgDiffNewId') || mw.config.get('wgDiffOldId')) {
mw.hook('wikipage.diff').add(function () {
n.addLinks.diff();
});
} else if (
mw.config.get('wgAction') === 'view' &&
mw.config.get('wgRevisionId') &&
mw.config.get('wgCurRevisionId') !== mw.config.get('wgRevisionId')
) {
n.addLinks.oldid();
} else if (
mw.config.get('wgAction') === 'history' &&
mw.config.get('wgArticleId')
) {
n.addLinks.history();
}
} else if (mw.config.get('wgNamespaceNumber') === -1) {
n.skipTalk = !getPref('openTalkPageOnAutoRevert');
n.rollbackInPlace = getPref('rollbackInPlace');
if (
mw.config.get('wgCanonicalSpecialPageName') === 'Contributions'
) {
n.addLinks.contributions();
} else if (
mw.config.get('wgCanonicalSpecialPageName') === 'Recentchanges' ||
mw.config.get('wgCanonicalSpecialPageName') ===
'Recentchangeslinked'
) {
mw.hook('wikipage.content').add(function (e) {
if (e.is('div')) {
n.addLinks.recentchanges();
}
});
}
}
return n;
}
Fluff.prototype.disableLinks = function (e) {
$(e)
.children()
.each(function (e, n) {
n.innerHTML = n.textContent;
$(n).css('font-weight', 'normal').css('color', 'darkgray');
});
};
Fluff.prototype.revert = function (e, n, r, s) {
var d = this;
if (mw.util.isIPv6Address(n)) {
n = Morebits.ip.sanitizeIPv6(n);
}
var p = s || mw.config.get('wgPageName');
var g = r || mw.config.get('wgCurRevisionId');
if (this.rollbackInPlace) {
var m = document.createElement('span');
mw.notify(m, {
autoHide: false,
title: 'Rollback on ' + s,
tag: 'twinklefluff_' + r,
});
Morebits.status.init(m);
} else {
Morebits.status.init(document.getElementById('mw-content-text'));
$('#catlinks').remove();
}
var b = { type: e, user: n, userHidden: !n, pagename: p, revid: g };
var v = {
action: 'query',
prop: ['info', 'revisions'].concat(
this.flaggedRevsEnabled ? 'flagged' : []
),
titles: p,
inprop: 'watched',
intestactions: 'edit',
rvlimit: getPref('revertMaxRevisions'),
rvprop: ['ids', 'timestamp', 'user'],
curtimestamp: '',
meta: 'tokens',
type: 'csrf',
format: 'json',
};
var k = new Morebits.wiki.api(msg('fetching-data'), v);
k.params = b;
k.post().then(function (e) {
return d.callbacks.main(e);
});
};
Fluff.prototype.revertToRevision = function (e) {
Morebits.status.init(document.getElementById('mw-content-text'));
var n = new Morebits.wiki.page(
mw.config.get('wgPageName'),
msg('saving-reverted')
);
n.setOldID(e);
n.load(this.callbacks.toRevision);
};
Fluff.prototype.formatSummary = function (e, n, r) {
var s = e;
if (r) {
s += ': ' + Morebits.string.toUpperCaseFirstChar(r);
}
if (/%USER%/.test(e)) {
if (n) {
var d = unescape(
encodeURIComponent(s.replace('%USER%', ''))
).length;
var p = '[[Special:Contributions/' + n + '|' + n + ']]';
var g = unescape(encodeURIComponent(p)).length;
if (d + g <= 499) {
var m = ' ([[User talk:' + n + '|talk]])';
if (d + g + unescape(encodeURIComponent(m)).length <= 499) {
s = Morebits.string.safeReplace(s, '%USER%', p + m);
} else {
s = Morebits.string.safeReplace(s, '%USER%', p);
}
} else {
s = Morebits.string.safeReplace(s, '%USER%', n);
}
} else {
s = Morebits.string.safeReplace(s, '%USER%', msg('hidden-user'));
}
}
return s;
};
Fluff.moduleName = 'fluff';
return Fluff;
})(Q);
var ae = (function (e) {
__extends(Fluff, e);
function Fluff() {
var n = (e !== null && e.apply(this, arguments)) || this;
n.trustedBots = [];
n.hiddenName = 'an unknown user';
return n;
}
return Fluff;
})(re);
var ie = (function (e) {
__extends(DiffCore, e);
function DiffCore() {
var n = e.call(this) || this;
if (
mw.config.get('wgNamespaceNumber') < 0 ||
!mw.config.get('wgArticleId')
) {
return n;
}
addPortletLink(
mw.util.getUrl(mw.config.get('wgPageName'), {
diff: 'cur',
oldid: 'prev',
}),
msg('diff-last'),
'twinkle-lastdiff',
msg('diff-last-tooltip')
);
if (!mw.util.getParamValue('diff')) {
return n;
}
addPortletLink(
function () {
return n.evaluate(false);
},
msg('diff-since'),
'tw-since',
msg('diff-since-tooltip')
);
addPortletLink(
function () {
return n.evaluate(true);
},
msg('diff-sincemine'),
'tw-sincemine',
msg('diff-sincemine-tooltip')
);
addPortletLink(
mw.util.getUrl(mw.config.get('wgPageName'), {
diff: 'cur',
oldid: /oldid=(.+)/.exec(
$('#mw-diff-ntitle1').find('strong a').first().attr('href')
)[1],
}),
msg('diff-current'),
'tw-curdiff',
msg('diff-current-tooltip')
);
return n;
}
DiffCore.prototype.evaluate = function (e) {
var n;
if (e) {
n = mw.config.get('wgUserName');
} else {
var r = document.getElementById('mw-diff-ntitle2');
if (!r) {
return;
}
n = $(r).find('a').first().text();
}
Morebits.status.init(document.getElementById('mw-content-text'));
var s = new D('Grabbing data of initial contributor', {
prop: 'revisions',
action: 'query',
titles: mw.config.get('wgPageName'),
rvlimit: 1,
rvprop: ['ids', 'user'],
rvstartid: mw.config.get('wgCurRevisionId') - 1,
rvuser: n,
format: 'json',
});
s.post().then(function (e) {
var r = e.getResponse().query.pages[0].revisions;
var s = r && r[0].revid;
if (!s) {
e.getStatusElement().error(msg('diff-error', n));
return;
}
window.location.href = mw.util.getUrl(mw.config.get('wgPageName'), {
diff: mw.config.get('wgCurRevisionId'),
oldid: s,
});
});
s.post();
};
DiffCore.moduleName = 'Diff';
return DiffCore;
})(Q);
var oe = (function (e) {
__extends(Page, e);
function Page(n, r) {
var s = e.call(this, n, r) || this;
if (d.changeTags.length) {
s.setChangeTags(d.changeTags);
} else {
var p = s.setEditSummary.bind(s);
s.setEditSummary = function (e) {
p(e + d.summaryAd);
};
}
var g = [
'load',
'lookupCreation',
'save',
'append',
'prepend',
'newSection',
'deletePage',
'undeletePage',
'protect',
'stabilize',
];
g.forEach(function (e) {
var n = s[e].bind(s);
s[e] = function (e, r) {
var s = this;
var d = $.Deferred();
n(
function (n) {
if (e) {
e.call(s, s);
}
d.resolve(n instanceof Morebits.wiki.api ? n : s);
},
function (e) {
if (r) {
r.call(s, s);
}
if (e instanceof Morebits.wiki.api) {
var n = new L(e.getErrorCode() + ': ' + e.getErrorText());
n.code = e.getErrorCode();
n.info = e.getErrorText();
n.response = e.getResponse();
d.reject(n);
} else {
d.reject(new Error(e));
}
}
);
return d;
};
});
return s;
}
return Page;
})(Morebits.wiki.page);
window.Twinkle = d;
$.extend(d, {
registerModule: registerModule,
msg: msg,
Page: oe,
Api: D,
});
if (typeof r !== 'undefined') {
jQuery.Deferred.exceptionHook = function (e) {
throw e;
};
}
if (
!Morebits.userIsInGroup('autoconfirmed') &&
!Morebits.userIsInGroup('confirmed')
) {
throw new Error('Twinkle: forbidden!');
}
d.userAgent = 'Twinkle ('.concat(mw.config.get('wgWikiID'), ')');
d.summaryAd = ' ([[Project:TW|TW]])';
d.changeTags = '';
d.messageOverrides = te;
d.extraMwMessages = ne;
d.registeredModules = [ae, ie];
_.permalinkSpecialPageName = 'Special:PermanentLink';
_.botUsernameRegex = /bot\b/i;
_.flaggedRevsNamespaces = [];
_.redirectTagAliases = ['#REDIRECT'];
init();
},
};
var n = {};
function __webpack_require__(r) {
var s = n[r];
if (s !== undefined) {
return s.exports;
}
var d = (n[r] = { exports: {} });
e[r].call(d.exports, d, d.exports, __webpack_require__);
return d.exports;
}
!(function () {
__webpack_require__.n = function (e) {
var n =
e && e.__esModule
? function () {
return e['default'];
}
: function () {
return e;
};
__webpack_require__.d(n, { a: n });
return n;
};
})();
!(function () {
__webpack_require__.d = function (e, n) {
for (var r in n) {
if (__webpack_require__.o(n, r) && !__webpack_require__.o(e, r)) {
Object.defineProperty(e, r, { enumerable: true, get: n[r] });
}
}
};
})();
!(function () {
__webpack_require__.o = function (e, n) {
return Object.prototype.hasOwnProperty.call(e, n);
};
})();
var r = __webpack_require__(419);
})();
/* </nowiki> */