From 717a9a3b90ee39af14fb51480bc9c3c4b6cdec25 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Wed, 17 Jul 2024 11:31:31 +0200 Subject: [PATCH] =?UTF-8?q?code.js=20:=20ajout=20comptage=20nb=20membres?= =?UTF-8?q?=20cr=C3=A9=C3=A9s=20et=20modifi=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/code.js b/code.js index e8b5b7c..a52d886 100644 --- a/code.js +++ b/code.js @@ -360,3 +360,20 @@ function ajouterMembres(tmembres, num) } return tmembres; } + +// Compter le nombre de membres créés et modifiés +function compter() +{ + let o = { cree: 0, modif: 0 }; + for (const msg of document.querySelectorAll('summary > h2')) + { + if (msg.textContent.includes('créé')) { + o.cree = Number(msg.textContent.split(' ')[0]); + } + if (msg.textContent.includes('modifié')) { + o.modif = Number(msg.textContent.split(' ')[0]); + } + } + return o; +} +