« MediaWiki:Common.js » : différence entre les versions

Page de l’interface de MediaWiki
Aucun résumé des modifications
mAucun résumé des modifications
 
(9 versions intermédiaires par le même utilisateur non affichées)
Ligne 135 : Ligne 135 :
// ######## NEW CODE ########
// ######## NEW CODE ########
// Change table card to dark if it's has a color if isn't, apply this modification to the td (for buttons)
// Change table card to dark if it's has a color if isn't, apply this modification to the td (for buttons)
if (document.documentElement.classList.contains("skin-citizen-dark")) {
if (document.documentElement.classList.contains("skin-citizen-dark")&&!(window.location.pathname==='/index.php/Accueil'||window.location.href.includes("?title=Accueil"))) {
   document.querySelectorAll("table").forEach(function(table){
   document.querySelectorAll("table").forEach(function(table){
     if (!(table.style.backgroundColor===""||table.style.backgroundColor==="transparent")) {
     if (!(table.style.backgroundColor===""||table.style.backgroundColor==="transparent")) {
Ligne 150 : Ligne 150 :
   })  
   })  
}
}


"use strict";
"use strict";


if (window.location.pathname === '/index.php/Accueil') {
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
  var uls = document.getElementsByClassName("mw-body-content")[0].querySelectorAll("ul");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
  document.getElementsByClassName("mw-body")[0].innerHTML = "\n    <div class=\"home-header\">\n        <h1>WikiThionville</h1>\n        <form class=\"hheader-form\" name=\"createbox\" action=\"/index.php\" method=\"get\" onclick=\"confetti()\">\n            <input type=\"hidden\" value=\"edit\" name=\"action\">\n            <input type=\"hidden\" value=\"Mod\xE8le:Conseils_Redac\" name=\"editintro\">\n            <input class=\"input\" name=\"title\" placeholder=\"Cr\xE9er un article\" required=\"\" size=\"50\" dir=\"ltr\">\n            <button class=\"btn\" type=\"submit\" name=\"create\">\n                <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"25\" height=\"25\" fill=\"currentColor\" class=\"bi bi-plus-lg\" viewBox=\"0 0 16 16\">\n                    <path fill-rule=\"evenodd\" d=\"M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2\"/>\n                </svg>\n            </button>\n        </form>\n        <p class=\"tinfo\">Vous devez poss\xE9der un compte</p>\n        <a class=\"enplus\" href=\"#plusdinfo\">\n            <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" fill=\"currentColor\" class=\"bi bi-arrow-down-circle\" viewBox=\"0 0 16 16\">\n                <path fill-rule=\"evenodd\" d=\"M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8m15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8.5 4.5a.5.5 0 0 0-1 0v5.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293z\"/>\n            </svg>\n            <p>En savoir plus</p>\n        </a>\n        \n    </div>\n    <div id=\"plusdinfo\">\n        <h1>Bienvenue sur Wikithionville, le portail des voisins</h1>\n        <h4>Wikithionville est une plateforme collaborative ouverte \xE0 tous les habitants de Thionville et de l\u2019agglom\xE9ration thionvilloise qui souhaitent faire conna\xEEtre leur projet et leurs initiatives, annoncer ou valoriser une action ou encore faire le portrait d\u2019un habitant, d\u2019une personne ressource sur un quartier, un territoire. Des histoires individuelles et collectives, des informations historiques, culturelles, sociales, \xE9conomiques peuvent \xEAtre publi\xE9es. L\u2019id\xE9e consiste \xE0 construire une dynamique locale, \xE0 cr\xE9er des liens sociaux en utilisant les outils multim\xE9dias contemporains, l\u2019Internet collaboratif</h4>\n        <h1>Contributions</h1>\n        <h4>Pour contribuer, il faut d'abord cr\xE9er un compte (en haut \xE0 droite de cette page). Pour cr\xE9er un article, taper le titre dans la fen\xEAtre, puis cliquer sur cr\xE9er un article.</h4>\n        \n        <div class=\"cardlist\">\n            <div class=\"li\">\n                <a class=\"card\" href=\"/index.php?title=Cat\xE9gorie:Portraits\">\n                    <div class=\"header\">\n                        <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30\" height=\"30\" fill=\"currentColor\" class=\"bi bi-brush\" viewBox=\"0 0 16 16\">\n                            <path d=\"M15.825.12a.5.5 0 0 1 .132.584c-1.53 3.43-4.743 8.17-7.095 10.64a6.1 6.1 0 0 1-2.373 1.534c-.018.227-.06.538-.16.868-.201.659-.667 1.479-1.708 1.74a8.1 8.1 0 0 1-3.078.132 4 4 0 0 1-.562-.135 1.4 1.4 0 0 1-.466-.247.7.7 0 0 1-.204-.288.62.62 0 0 1 .004-.443c.095-.245.316-.38.461-.452.394-.197.625-.453.867-.826.095-.144.184-.297.287-.472l.117-.198c.151-.255.326-.54.546-.848.528-.739 1.201-.925 1.746-.896q.19.012.348.048c.062-.172.142-.38.238-.608.261-.619.658-1.419 1.187-2.069 2.176-2.67 6.18-6.206 9.117-8.104a.5.5 0 0 1 .596.04M4.705 11.912a1.2 1.2 0 0 0-.419-.1c-.246-.013-.573.05-.879.479-.197.275-.355.532-.5.777l-.105.177c-.106.181-.213.362-.32.528a3.4 3.4 0 0 1-.76.861c.69.112 1.736.111 2.657-.12.559-.139.843-.569.993-1.06a3 3 0 0 0 .126-.75zm1.44.026c.12-.04.277-.1.458-.183a5.1 5.1 0 0 0 1.535-1.1c1.9-1.996 4.412-5.57 6.052-8.631-2.59 1.927-5.566 4.66-7.302 6.792-.442.543-.795 1.243-1.042 1.826-.121.288-.214.54-.275.72v.001l.575.575zm-4.973 3.04.007-.005zm3.582-3.043.002.001h-.002z\"/>\n                        </svg>\n                        <p>Portraits d'habitants</p>\n                    </div>\n                    <p>Voici les portraits de certains habitants dont l'histoire ne peut \xEAtre dissoci\xE9e de celle de Thionville.</p>\n                </a>\n                \n                <a class=\"card\" href=\"/index.php?title=Cat\xE9gorie:Associatif\">\n                    <div class=\"header\">\n                        <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30\" height=\"30\" fill=\"currentColor\" class=\"bi bi-people\" viewBox=\"0 0 16 16\">\n                            <path d=\"M15 14s1 0 1-1-1-4-5-4-5 3-5 4 1 1 1 1zm-7.978-1L7 12.996c.001-.264.167-1.03.76-1.72C8.312 10.629 9.282 10 11 10c1.717 0 2.687.63 3.24 1.276.593.69.758 1.457.76 1.72l-.008.002-.014.002zM11 7a2 2 0 1 0 0-4 2 2 0 0 0 0 4m3-2a3 3 0 1 1-6 0 3 3 0 0 1 6 0M6.936 9.28a6 6 0 0 0-1.23-.247A7 7 0 0 0 5 9c-4 0-5 3-5 4q0 1 1 1h4.216A2.24 2.24 0 0 1 5 13c0-1.01.377-2.042 1.09-2.904.243-.294.526-.569.846-.816M4.92 10A5.5 5.5 0 0 0 4 13H1c0-.26.164-1.03.76-1.724.545-.636 1.492-1.256 3.16-1.275ZM1.5 5.5a3 3 0 1 1 6 0 3 3 0 0 1-6 0m3-2a2 2 0 1 0 0 4 2 2 0 0 0 0-4\"/>\n                          </svg>\n                        <p>Solidaire et associatif</p>\n                    </div>\n                    <p>Action sociale et humanitaire, b\xE9n\xE9volat, volontariat, ... Comment les thionvillois aident et s'entraident.</p>\n                </a>\n                \n                <a class=\"card\" href=\"/index.php?title=Cat\xE9gorie:M\xE9moire\">\n                    <div class=\"header\">\n                        <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30\" height=\"30\" fill=\"currentColor\" class=\"bi bi-hourglass-split\" viewBox=\"0 0 16 16\">\n                            <path d=\"M2.5 15a.5.5 0 1 1 0-1h1v-1a4.5 4.5 0 0 1 2.557-4.06c.29-.139.443-.377.443-.59v-.7c0-.213-.154-.451-.443-.59A4.5 4.5 0 0 1 3.5 3V2h-1a.5.5 0 0 1 0-1h11a.5.5 0 0 1 0 1h-1v1a4.5 4.5 0 0 1-2.557 4.06c-.29.139-.443.377-.443.59v.7c0 .213.154.451.443.59A4.5 4.5 0 0 1 12.5 13v1h1a.5.5 0 0 1 0 1zm2-13v1c0 .537.12 1.045.337 1.5h6.326c.216-.455.337-.963.337-1.5V2zm3 6.35c0 .701-.478 1.236-1.011 1.492A3.5 3.5 0 0 0 4.5 13s.866-1.299 3-1.48zm1 0v3.17c2.134.181 3 1.48 3 1.48a3.5 3.5 0 0 0-1.989-3.158C8.978 9.586 8.5 9.052 8.5 8.351z\"/>\n                          </svg>\n                        <p>M\xE9moire et territoire</p>\n                    </div>\n                    <p>Histoire de Thionville et de ses quartiers racont\xE9e par ceux qui l'ont v\xE9cue, par des professionnels\u2026</p>\n                </a>\n                \n                <a class=\"card\" href=\"/index.php?title=Cat\xE9gorie:Webtv\">\n                    <div class=\"header\">\n                        <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30\" height=\"30\" fill=\"currentColor\" class=\"bi bi-camera-reels\" viewBox=\"0 0 16 16\">\n                            <path d=\"M6 3a3 3 0 1 1-6 0 3 3 0 0 1 6 0M1 3a2 2 0 1 0 4 0 2 2 0 0 0-4 0\"/>\n                            <path d=\"M9 6h.5a2 2 0 0 1 1.983 1.738l3.11-1.382A1 1 0 0 1 16 7.269v7.462a1 1 0 0 1-1.406.913l-3.111-1.382A2 2 0 0 1 9.5 16H2a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2zm6 8.73V7.27l-3.5 1.555v4.35zM1 8v6a1 1 0 0 0 1 1h7.5a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1\"/>\n                            <path d=\"M9 6a3 3 0 1 0 0-6 3 3 0 0 0 0 6M7 3a2 2 0 1 1 4 0 2 2 0 0 1-4 0\"/>\n                          </svg>\n                        <p>WEB Tv Jeunes</p>\n                    </div>\n                    <p>Reportage, court-m\xE9trage, clip video, r\xE9alis\xE9s par des jeunes de l'agglom\xE9ration de Thionville</p>\n                </a>\n                \n                <a class=\"card\" href=\"/index.php?title=Cat\xE9gorie:Culture\">\n                    <div class=\"header\">\n                        <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30\" height=\"30\" fill=\"currentColor\" class=\"bi bi-palette\" viewBox=\"0 0 16 16\">\n                            <path d=\"M8 5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3m4 3a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3M5.5 7a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m.5 6a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3\"/>\n                            <path d=\"M16 8c0 3.15-1.866 2.585-3.567 2.07C11.42 9.763 10.465 9.473 10 10c-.603.683-.475 1.819-.351 2.92C9.826 14.495 9.996 16 8 16a8 8 0 1 1 8-8m-8 7c.611 0 .654-.171.655-.176.078-.146.124-.464.07-1.119-.014-.168-.037-.37-.061-.591-.052-.464-.112-1.005-.118-1.462-.01-.707.083-1.61.704-2.314.369-.417.845-.578 1.272-.618.404-.038.812.026 1.16.104.343.077.702.186 1.025.284l.028.008c.346.105.658.199.953.266.653.148.904.083.991.024C14.717 9.38 15 9.161 15 8a7 7 0 1 0-7 7\"/>\n                          </svg>\n                        <p>Arts et cultures</p>\n                    </div>\n                    <p>Art et culture de chez nous !</p>\n                </a>\n                \n                <a class=\"card\" href=\"/index.php?title=Cat\xE9gorie:Litt\xE9rature_d%27ici_et_d%27ailleurs\">\n                    <div class=\"header\">\n                        <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30\" height=\"30\" fill=\"currentColor\" class=\"bi bi-book-half\" viewBox=\"0 0 16 16\">\n                            <path d=\"M8.5 2.687c.654-.689 1.782-.886 3.112-.752 1.234.124 2.503.523 3.388.893v9.923c-.918-.35-2.107-.692-3.287-.81-1.094-.111-2.278-.039-3.213.492zM8 1.783C7.015.936 5.587.81 4.287.94c-1.514.153-3.042.672-3.994 1.105A.5.5 0 0 0 0 2.5v11a.5.5 0 0 0 .707.455c.882-.4 2.303-.881 3.68-1.02 1.409-.142 2.59.087 3.223.877a.5.5 0 0 0 .78 0c.633-.79 1.814-1.019 3.222-.877 1.378.139 2.8.62 3.681 1.02A.5.5 0 0 0 16 13.5v-11a.5.5 0 0 0-.293-.455c-.952-.433-2.48-.952-3.994-1.105C10.413.809 8.985.936 8 1.783\"/>\n                        </svg>\n                        <p>Litt\xE9rature d'ici et d'ailleurs</p>\n                    </div>\n                    <p>Regard sur la litt\xE9rature, notes de lecture, sur des livres d'ici et d'ailleurs</p>\n                </a>\n                \n                <a class=\"card\" href=\"/index.php?title=Cat\xE9gorie:Fronti\xE8res\">\n                    <div class=\"header\">\n                        <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30\" height=\"30\" fill=\"currentColor\" class=\"bi bi-globe-europe-africa\" viewBox=\"0 0 16 16\">\n                            <path d=\"M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0M3.668 2.501l-.288.646a.847.847 0 0 0 1.479.815l.245-.368a.81.81 0 0 1 1.034-.275.81.81 0 0 0 .724 0l.261-.13a1 1 0 0 1 .775-.05l.984.34q.118.04.243.054c.784.093.855.377.694.801-.155.41-.616.617-1.035.487l-.01-.003C8.274 4.663 7.748 4.5 6 4.5 4.8 4.5 3.5 5.62 3.5 7c0 1.96.826 2.166 1.696 2.382.46.115.935.233 1.304.618.449.467.393 1.181.339 1.877C6.755 12.96 6.674 14 8.5 14c1.75 0 3-3.5 3-4.5 0-.262.208-.468.444-.7.396-.392.87-.86.556-1.8-.097-.291-.396-.568-.641-.756-.174-.133-.207-.396-.052-.551a.33.33 0 0 1 .42-.042l1.085.724c.11.072.255.058.348-.035.15-.15.415-.083.489.117.16.43.445 1.05.849 1.357L15 8A7 7 0 1 1 3.668 2.501\"/>\n                        </svg>\n                        <p>Au-del\xE0 des fronti\xE8res</p>\n                    </div>\n                    <p>Wikithionville s'ouvre au monde.</p>\n                </a>\n                \n                <a class=\"card\" href=\"/index.php?title=Cat\xE9gorie:Passions\">\n                    <div class=\"header\">\n                        <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30\" height=\"30\" fill=\"currentColor\" class=\"bi bi-cookie\" viewBox=\"0 0 16 16\">\n                            <path d=\"M6 7.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m4.5.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3m-.5 3.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0\"/>\n                            <path d=\"M8 0a7.96 7.96 0 0 0-4.075 1.114q-.245.102-.437.28A8 8 0 1 0 8 0m3.25 14.201a1.5 1.5 0 0 0-2.13.71A7 7 0 0 1 8 15a6.97 6.97 0 0 1-3.845-1.15 1.5 1.5 0 1 0-2.005-2.005A6.97 6.97 0 0 1 1 8c0-1.953.8-3.719 2.09-4.989a1.5 1.5 0 1 0 2.469-1.574A7 7 0 0 1 8 1c1.42 0 2.742.423 3.845 1.15a1.5 1.5 0 1 0 2.005 2.005A6.97 6.97 0 0 1 15 8c0 .596-.074 1.174-.214 1.727a1.5 1.5 0 1 0-1.025 2.25 7 7 0 0 1-2.51 2.224Z\"/>\n                        </svg>\n                        <p>Cuisine, bricolage et passion</p>\n                    </div>\n                    <p>Partager ses connaissances,ses savoirs-faire, ses passions ...</p>\n                </a>\n                \n                <a class=\"card\" href=\"/index.php?title=Cat\xE9gorie:Quartier\">\n                    <div class=\"header\">\n                        <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30\" height=\"30\" fill=\"currentColor\" class=\"bi bi-houses\" viewBox=\"0 0 16 16\">\n                            <path d=\"M5.793 1a1 1 0 0 1 1.414 0l.647.646a.5.5 0 1 1-.708.708L6.5 1.707 2 6.207V12.5a.5.5 0 0 0 .5.5.5.5 0 0 1 0 1A1.5 1.5 0 0 1 1 12.5V7.207l-.146.147a.5.5 0 0 1-.708-.708zm3 1a1 1 0 0 1 1.414 0L12 3.793V2.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v3.293l1.854 1.853a.5.5 0 0 1-.708.708L15 8.207V13.5a1.5 1.5 0 0 1-1.5 1.5h-8A1.5 1.5 0 0 1 4 13.5V8.207l-.146.147a.5.5 0 1 1-.708-.708zm.707.707L5 7.207V13.5a.5.5 0 0 0 .5.5h8a.5.5 0 0 0 .5-.5V7.207z\"/>\n                        </svg>\n                        <p>Mon quartier</p>\n                    </div>\n                    <p>Quand les habitants pr\xE9sentent leurs quartiers...</p>\n                </a>\n                \n                <a class=\"card\" href=\"/index.php?title=Cat\xE9gorie:Environnement_et_d\xE9veloppement_durable\">\n                    <div class=\"header\">\n                        <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30\" height=\"30\" fill=\"currentColor\" class=\"bi bi-flower1\" viewBox=\"0 0 16 16\">\n                            <path d=\"M6.174 1.184a2 2 0 0 1 3.652 0A2 2 0 0 1 12.99 3.01a2 2 0 0 1 1.826 3.164 2 2 0 0 1 0 3.652 2 2 0 0 1-1.826 3.164 2 2 0 0 1-3.164 1.826 2 2 0 0 1-3.652 0A2 2 0 0 1 3.01 12.99a2 2 0 0 1-1.826-3.164 2 2 0 0 1 0-3.652A2 2 0 0 1 3.01 3.01a2 2 0 0 1 3.164-1.826M8 1a1 1 0 0 0-.998 1.03l.01.091q.017.116.054.296c.049.241.122.542.213.887.182.688.428 1.513.676 2.314L8 5.762l.045-.144c.248-.8.494-1.626.676-2.314.091-.345.164-.646.213-.887a5 5 0 0 0 .064-.386L9 2a1 1 0 0 0-1-1M2 9l.03-.002.091-.01a5 5 0 0 0 .296-.054c.241-.049.542-.122.887-.213a61 61 0 0 0 2.314-.676L5.762 8l-.144-.045a61 61 0 0 0-2.314-.676 17 17 0 0 0-.887-.213 5 5 0 0 0-.386-.064L2 7a1 1 0 1 0 0 2m7 5-.002-.03a5 5 0 0 0-.064-.386 16 16 0 0 0-.213-.888 61 61 0 0 0-.676-2.314L8 10.238l-.045.144c-.248.8-.494 1.626-.676 2.314-.091.345-.164.646-.213.887a5 5 0 0 0-.064.386L7 14a1 1 0 1 0 2 0m-5.696-2.134.025-.017a5 5 0 0 0 .303-.248c.184-.164.408-.377.661-.629A61 61 0 0 0 5.96 9.23l.103-.111-.147.033a61 61 0 0 0-2.343.572c-.344.093-.64.18-.874.258a5 5 0 0 0-.367.138l-.027.014a1 1 0 1 0 1 1.732zM4.5 14.062a1 1 0 0 0 1.366-.366l.014-.027q.014-.03.036-.084a5 5 0 0 0 .102-.283c.078-.233.165-.53.258-.874a61 61 0 0 0 .572-2.343l.033-.147-.11.102a61 61 0 0 0-1.743 1.667 17 17 0 0 0-.629.66 5 5 0 0 0-.248.304l-.017.025a1 1 0 0 0 .366 1.366m9.196-8.196a1 1 0 0 0-1-1.732l-.025.017a5 5 0 0 0-.303.248 17 17 0 0 0-.661.629A61 61 0 0 0 10.04 6.77l-.102.111.147-.033a61 61 0 0 0 2.342-.572c.345-.093.642-.18.875-.258a5 5 0 0 0 .367-.138zM11.5 1.938a1 1 0 0 0-1.366.366l-.014.027q-.014.03-.036.084a5 5 0 0 0-.102.283c-.078.233-.165.53-.258.875a61 61 0 0 0-.572 2.342l-.033.147.11-.102a61 61 0 0 0 1.743-1.667c.252-.253.465-.477.629-.66a5 5 0 0 0 .248-.304l.017-.025a1 1 0 0 0-.366-1.366M14 9a1 1 0 0 0 0-2l-.03.002a5 5 0 0 0-.386.064c-.242.049-.543.122-.888.213-.688.182-1.513.428-2.314.676L10.238 8l.144.045c.8.248 1.626.494 2.314.676.345.091.646.164.887.213a5 5 0 0 0 .386.064zM1.938 4.5a1 1 0 0 0 .393 1.38l.084.035q.108.045.283.103c.233.078.53.165.874.258a61 61 0 0 0 2.343.572l.147.033-.103-.111a61 61 0 0 0-1.666-1.742 17 17 0 0 0-.66-.629 5 5 0 0 0-.304-.248l-.025-.017a1 1 0 0 0-1.366.366m2.196-1.196.017.025a5 5 0 0 0 .248.303c.164.184.377.408.629.661A61 61 0 0 0 6.77 5.96l.111.102-.033-.147a61 61 0 0 0-.572-2.342c-.093-.345-.18-.642-.258-.875a5 5 0 0 0-.138-.367l-.014-.027a1 1 0 1 0-1.732 1m9.928 8.196a1 1 0 0 0-.366-1.366l-.027-.014a5 5 0 0 0-.367-.138c-.233-.078-.53-.165-.875-.258a61 61 0 0 0-2.342-.572l-.147-.033.102.111a61 61 0 0 0 1.667 1.742c.253.252.477.465.66.629a5 5 0 0 0 .304.248l.025.017a1 1 0 0 0 1.366-.366m-3.928 2.196a1 1 0 0 0 1.732-1l-.017-.025a5 5 0 0 0-.248-.303 17 17 0 0 0-.629-.661A61 61 0 0 0 9.23 10.04l-.111-.102.033.147a61 61 0 0 0 .572 2.342c.093.345.18.642.258.875a5 5 0 0 0 .138.367zM8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3\"/>\n                        </svg>\n                        <p>Environnement et d\xE9veloppement durable</p>\n                    </div>\n                    <p>Un nouveau regard sur notre environnement...</p>\n                </a>\n                \n                <a class=\"card\" href=\"/index.php?title=Cat\xE9gorie:Sports-loisirs\">\n                    <div class=\"header\">\n                        <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30\" height=\"30\" fill=\"currentColor\" class=\"bi bi-person-walking\" viewBox=\"0 0 16 16\">\n                            <path d=\"M9.5 1.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M6.44 3.752A.75.75 0 0 1 7 3.5h1.445c.742 0 1.32.643 1.243 1.38l-.43 4.083a1.8 1.8 0 0 1-.088.395l-.318.906.213.242a.8.8 0 0 1 .114.175l2 4.25a.75.75 0 1 1-1.357.638l-1.956-4.154-1.68-1.921A.75.75 0 0 1 6 8.96l.138-2.613-.435.489-.464 2.786a.75.75 0 1 1-1.48-.246l.5-3a.75.75 0 0 1 .18-.375l2-2.25Z\"/>\n                            <path d=\"M6.25 11.745v-1.418l1.204 1.375.261.524a.8.8 0 0 1-.12.231l-2.5 3.25a.75.75 0 1 1-1.19-.914zm4.22-4.215-.494-.494.205-1.843.006-.067 1.124 1.124h1.44a.75.75 0 0 1 0 1.5H11a.75.75 0 0 1-.531-.22Z\"/>\n                        </svg>\n                        <p>Sports et loisirs</p>\n                    </div>\n                    <p>La pratique sportive et les loisirs pour d\xE9velopper une expression citoyenne</p>\n                </a>\n                \n                <a class=\"card\" href=\"/index.php?title=Cat\xE9gorie:Travail\">\n                    <div class=\"header\">\n                        <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30\" height=\"30\" fill=\"currentColor\" class=\"bi bi-tools\" viewBox=\"0 0 16 16\">\n                            <path d=\"M1 0 0 1l2.2 3.081a1 1 0 0 0 .815.419h.07a1 1 0 0 1 .708.293l2.675 2.675-2.617 2.654A3.003 3.003 0 0 0 0 13a3 3 0 1 0 5.878-.851l2.654-2.617.968.968-.305.914a1 1 0 0 0 .242 1.023l3.27 3.27a.997.997 0 0 0 1.414 0l1.586-1.586a.997.997 0 0 0 0-1.414l-3.27-3.27a1 1 0 0 0-1.023-.242L10.5 9.5l-.96-.96 2.68-2.643A3.005 3.005 0 0 0 16 3q0-.405-.102-.777l-2.14 2.141L12 4l-.364-1.757L13.777.102a3 3 0 0 0-3.675 3.68L7.462 6.46 4.793 3.793a1 1 0 0 1-.293-.707v-.071a1 1 0 0 0-.419-.814zm9.646 10.646a.5.5 0 0 1 .708 0l2.914 2.915a.5.5 0 0 1-.707.707l-2.915-2.914a.5.5 0 0 1 0-.708M3 11l.471.242.529.026.287.445.445.287.026.529L5 13l-.242.471-.026.529-.445.287-.287.445-.529.026L3 15l-.471-.242L2 14.732l-.287-.445L1.268 14l-.026-.529L1 13l.242-.471.026-.529.445-.287.287-.445.529-.026z\"/>\n                            </svg>\n                        <p>Travail, artisanat et savoir-faire</p>\n                    </div>\n                    <p>Le travail dans tous ses \xE9tats...</p>\n                </a>\n            </div>\n        </div>\n    </div>\n    <div class=\"degrad\"></div>\n    <div class=\"marklist\">\n        <div>\n            <a href=\"./Festival_%22Le_R%C3%A9el_en_Vue%22\">\n                <img height=\"70\" src=\"/images/3/3e/Logo_rev.png\" alt=\"Festival Le R\xE9el en Vue\">\n            </a>\n            <a href=\"./Ma_Petite_Europe\">\n                <img height=\"70\" src=\"/images/f/f0/LOGO_MA_PETITE_EUROPE_V4.jpg\" alt=\"Ma Petite Europe\">\n            </a>\n            <a href=\"./Femmes_au_pluriel_:_un_autre_regard_sur_le_territoire\">\n                <img height=\"70\" src=\"/images/6/61/Femmes_au_pluriel_marque2.png\" alt=\"Femmes au pluriel : un autre regard sur le territoire\">\n            </a>\n            <a href=\"./UPOPAM\">\n                <img height=\"70\" src=\"/images/e/e9/Article_pr%C3%A9sentation_upopam.png\" alt=\"UPOPAM\">\n            </a>\n            <a href=\"./Sentier_d\xE9couverte\">\n                <img height=\"70\" src=\"/images/d/d6/Logo_sentier.jpg\" alt=\" Sentier d\xE9couverte\">\n            </a>\n        </div>\n    </div>    \n    <div class=\"favs\">\n        <h1>\n            Articles populaires\n        </h1>\n        <ul>".concat(uls[0].innerHTML, "</ul>\n        <h1>\n            Articles r\xE9cemment post\xE9s\n        </h1>\n        <ul>").concat(uls[1].innerHTML, "</ul>\n        <h1>\n            Articles r\xE9cemment mis \xE0 jour\n        </h1>\n        <ul>").concat(uls[2].innerHTML, "</ul>\n    </div>\n    <div class=\"marklist\">\n        <h1>Partenaires</h1>\n        <div>\n            <a href=\"https://www.grandest.fr/\">\n                <img height=\"70\" src=\"/home/rge-rvb.png\" alt=\"La R\xE9gion GrandEst\">\n            </a>\n            <a href=\"https://www.moselle.fr/\">\n                <img height=\"70\" src=\"/home/conseild_modelle.png\" alt=\"Le Conseil d\xE9partemental de la Moselle\">\n            </a>\n            <a href=\"https://www.thionville.fr/\">\n                <img height=\"70\" src=\"/home/thionville_logo.svg\" alt=\"La Ville de Thionville\">\n            </a>\n            <a href=\"https://www.thionville.fr/annuaires/services/detail/centre-communal-daction-sociale\">\n                <img height=\"70\" src=\"/home/LOGO_CCAS.png\" alt=\"Le Centre Communal d'Action Sociale de Thionville\">\n            </a>\n            <a href=\"https://www.thionville.fr/annuaires/services/detail/centre-communal-daction-sociale\">\n                <img height=\"70\" src=\"/home/CAF_LOGO.jpg\" alt=\"CAF Moselle\">\n            </a>\n        </div>\n    </div>\n    ");
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
function UpdateCounters(_x, _x2) {
  return _UpdateCounters.apply(this, arguments);
}
function _UpdateCounters() {
  _UpdateCounters = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(elm, value) {
    var count;
    return _regeneratorRuntime().wrap(function _callee$(_context) {
      while (1) switch (_context.prev = _context.next) {
        case 0:
          elm = document.getElementById(elm);
          _context.next = 3;
          return new Promise(function (r) {
            var interval = setInterval(function () {
              var rect = elm.getBoundingClientRect();
              if (!(rect.bottom < 0 || rect.top - Math.max(document.documentElement.clientHeight, window.innerHeight) >= 0)) {
                clearInterval(interval);
                r();
              }
            }, 500);
          });
        case 3:
          count = 0;
        case 4:
          if (!(count <= value)) {
            _context.next = 11;
            break;
          }
          elm.innerText = count.toLocaleString(navigator.language, {
            notation: "compact",
            compactDisplay: "short",
            maximumFractionDigits: 1
          });
          _context.next = 8;
          return new Promise(function (r) {
            setTimeout(r, 10);
          });
        case 8:
          count += Math.ceil(value / 100);
          _context.next = 4;
          break;
        case 11:
        case "end":
          return _context.stop();
      }
    }, _callee);
  }));
  return _UpdateCounters.apply(this, arguments);
}
if (window.location.pathname === '/index.php/Accueil' || window.location.href.includes("?title=Accueil")) {
  fetch("https://wikithionville.fr/api.php?action=query&meta=userinfo|siteinfo&uiprop=rights|editcount|realname&siprop=statistics&format=json").then(function (res) {
    return res.json();
  }).then(function (res) {
    if (res.query.userinfo.rights.includes("edit")) {
      document.getElementById("search_form").style.display = "none";
      document.getElementById("new_article_form").style.display = "flex";
    }
    document.getElementsByClassName("counters")[0].style.display = "flex";
    UpdateCounters("counter_articles", res.query.statistics.articles);
    UpdateCounters("counter_pages", res.query.statistics.pages);
    UpdateCounters("counter_utilisateurs", res.query.statistics.users);
    if (res.query.userinfo.editcount > 0) {
      document.getElementById("ccard_contribperso").style.display = "flex";
      UpdateCounters("counter_contribperso", res.query.userinfo.editcount);
    }
  });
}
}
[].forEach.call(document.getElementsByClassName("text-marquee"), function (marquee) {
  var text_elm = marquee.querySelector("*");
  var ofw = marquee.clientWidth - text_elm.scrollWidth;
  var duration = Math.max(Math.round(-ofw / 15), 1);
  if (ofw < 0) {
    marquee.style.animation = duration + "s linear infinite alternate paused gardient_slide";
    text_elm.style.setProperty("--ofw", ofw + 'px');
    text_elm.style.animation = duration + "s linear infinite alternate paused text_slide";
  }
});

Dernière version du 13 mai 2024 à 15:19

/* Tout JavaScript ici sera chargé avec chaque page accédée par n’importe quel utilisateur. */
/* Tout JavaScript ici sera chargé avec chaque page accédée par n’importe quel utilisateur. */
/**
 * Ajouter un bouton à la fin de la barre d'outils
 */
function addCustomButton(imageFile, speedTip, tagOpen, tagClose, sampleText, imageId) {
  // Supprimée car non fonctionelle
  // mwCustomEditButtons[mwCustomEditButtons.length] =
  //   {"imageId": imageId,
  //    "imageFile": imageFile,
  //    "speedTip": speedTip,
  //    "tagOpen": tagOpen,
  //    "tagClose": tagClose,
  //    "sampleText": sampleText};
}
 
/**
 * Insertion de nouveaux boutons dans la barre d'outil
 */
 



addCustomButton('http://upload.wikimedia.org/wikipedia/commons/1/1f/Button_mp3.png',
                'Insérer un fichier mp3',
                '<flashmp3> NomFichier.mp3 </flashmp3>',
                '',
                '',
                'mw-editbutton-mp3');


addCustomButton('http://upload.wikimedia.org/wikipedia/commons/9/92/Nuvola-Multimedia01.png',
                'Video',
                '{{',
                '}}',
                '#ev:service|code|taille',
                'mw-editbutton-video');

                


addCustomButton('http://upload.wikimedia.org/wikipedia/commons/0/04/Button_array.png',
                'Tableau',
                '{| border=1\n|-\n|\n|\n|}',
                '',
                '',
                'mw-editbutton-array');

addCustomButton('http://upload.wikimedia.org/wikipedia/commons/c/c9/Button_strike.png',
                'Rayer',
                '<s>',
                '</s>',
                '',
                'mw-editbutton-strike');

addCustomButton('http://upload.wikimedia.org/wikipedia/commons/8/88/Btn_toolbar_enum.png',
                'Énumération',
                '\n# élément 1\n# élément 2\n# élément 3',
                '',
                '',
                'mw-editbutton-enum');

addCustomButton('http://upload.wikimedia.org/wikipedia/commons/1/11/Btn_toolbar_liste.png',
                'Liste',
                '\n* élément A\n* élément B\n* élément C',
                '',
                '',
                'mw-editbutton-liste');

addCustomButton('http://upload.wikimedia.org/wikipedia/commons/9/9e/Btn_toolbar_gallery.png',
                'Galerie d\'images',
                '\n<!--Consultez l Anti-sèche pour les options de la galerie-->\n<center>\n<gallery caption="Donner un titre à votre galerie">\nImage:Exemple.jpg|légende\nImage:Exemple1.jpg|légende\nImage:Exemple2.jpg|légende\n</gallery>\n</center>',
                '',
                '',
                'mw-editbutton-gallery');

addCustomButton('http://upload.wikimedia.org/wikipedia/commons/3/37/Btn_toolbar_commentaire.png',
                'Commentaire',
                '<!--',
                '-->',
                '',
                'mw-editbutton-comment');

addCustomButton('http://upload.wikimedia.org/wikipedia/commons/4/47/Button_redir.png',
                'Redirection',
                '#REDIRECT [[',
                ']]',
                'nom de la destination',
                'mw-editbutton-redir');

addCustomButton('http://upload.wikimedia.org/wikipedia/commons/b/b4/Button_category03.png',
                'Catégorie',
                '[[Catégorie:',
                ']]',
                'nom de la catégorie',
                'mw-editbutton-category');

addCustomButton('http://upload.wikimedia.org/wikipedia/commons/3/3b/Button_template_alt.png',
                'Modèle',
                '{{',
                '}}',
                'modèle ou page à inclure',
                'mw-editbutton-template');

addCustomButton('http://upload.wikimedia.org/wikipedia/commons/c/c4/Button_ref.png',
                'Référence',
                '<ref>',
                '</ref>',
                'référence, citation ou lien',
                'mw-editbutton-ref');

addCustomButton('http://upload.wikimedia.org/wikipedia/commons/6/64/Buttonrefvs8.png',
                'Index des références',
                '== Notes et références ==\n<references />',
                '',
                '',
                'mw-editbutton-references');

var voirAussi = '<!-- Suggestion de présentation des annexes. Aide : http://fr.wikipedia.org/wiki/Aide:Note -->\n'
 + '== Annexes ==\n'
 + '=== Notes et références ===\n'
 + '<references/>\n'
 + '=== Articles connexes ===\n'
 + '* [[À remplacer]]\n'
 + '*\n'
 + '=== Liens et documents externes ===\n'
 + '*\n';
addCustomButton('http://upload.wikimedia.org/wikipedia/commons/b/bb/Seealso.png',
                'Section Voir aussi',
                voirAussi,
                '',
                '',
                'mw-editbutton-voiraussi');

// ######## NEW CODE ########
// Change table card to dark if it's has a color if isn't, apply this modification to the td (for buttons)
if (document.documentElement.classList.contains("skin-citizen-dark")&&!(window.location.pathname==='/index.php/Accueil'||window.location.href.includes("?title=Accueil"))) {
  document.querySelectorAll("table").forEach(function(table){
    if (!(table.style.backgroundColor===""||table.style.backgroundColor==="transparent")) {
      table.style.backgroundColor="#212630"
    }else{
      table.querySelectorAll("td").forEach(function(td){
        if (!(td.style.backgroundColor===""||td.style.backgroundColor==="transparent")) {
          td.style.backgroundColor="#212630"
          td.style.border="2px solid rgb(101 133 209)"
          td.style.margin="5px"
        }
      })
    }
  }) 
}

"use strict";

function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
function UpdateCounters(_x, _x2) {
  return _UpdateCounters.apply(this, arguments);
}
function _UpdateCounters() {
  _UpdateCounters = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(elm, value) {
    var count;
    return _regeneratorRuntime().wrap(function _callee$(_context) {
      while (1) switch (_context.prev = _context.next) {
        case 0:
          elm = document.getElementById(elm);
          _context.next = 3;
          return new Promise(function (r) {
            var interval = setInterval(function () {
              var rect = elm.getBoundingClientRect();
              if (!(rect.bottom < 0 || rect.top - Math.max(document.documentElement.clientHeight, window.innerHeight) >= 0)) {
                clearInterval(interval);
                r();
              }
            }, 500);
          });
        case 3:
          count = 0;
        case 4:
          if (!(count <= value)) {
            _context.next = 11;
            break;
          }
          elm.innerText = count.toLocaleString(navigator.language, {
            notation: "compact",
            compactDisplay: "short",
            maximumFractionDigits: 1
          });
          _context.next = 8;
          return new Promise(function (r) {
            setTimeout(r, 10);
          });
        case 8:
          count += Math.ceil(value / 100);
          _context.next = 4;
          break;
        case 11:
        case "end":
          return _context.stop();
      }
    }, _callee);
  }));
  return _UpdateCounters.apply(this, arguments);
}
if (window.location.pathname === '/index.php/Accueil' || window.location.href.includes("?title=Accueil")) {
  fetch("https://wikithionville.fr/api.php?action=query&meta=userinfo|siteinfo&uiprop=rights|editcount|realname&siprop=statistics&format=json").then(function (res) {
    return res.json();
  }).then(function (res) {
    if (res.query.userinfo.rights.includes("edit")) {
      document.getElementById("search_form").style.display = "none";
      document.getElementById("new_article_form").style.display = "flex";
    }
    document.getElementsByClassName("counters")[0].style.display = "flex";
    UpdateCounters("counter_articles", res.query.statistics.articles);
    UpdateCounters("counter_pages", res.query.statistics.pages);
    UpdateCounters("counter_utilisateurs", res.query.statistics.users);
    if (res.query.userinfo.editcount > 0) {
      document.getElementById("ccard_contribperso").style.display = "flex";
      UpdateCounters("counter_contribperso", res.query.userinfo.editcount);
    }
  });
}

[].forEach.call(document.getElementsByClassName("text-marquee"), function (marquee) {
  var text_elm = marquee.querySelector("*");
  var ofw = marquee.clientWidth - text_elm.scrollWidth;
  var duration = Math.max(Math.round(-ofw / 15), 1);
  if (ofw < 0) {
    marquee.style.animation = duration + "s linear infinite alternate paused gardient_slide";
    text_elm.style.setProperty("--ofw", ofw + 'px');
    text_elm.style.animation = duration + "s linear infinite alternate paused text_slide";
  }
});