From: Raphaël Jakse Date: Sat, 3 May 2025 17:09:58 +0000 (+0200) Subject: Make the player name change button a discrete pencil button X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=22d7c46b12678d8a7c54ec103445405ff7585323;p=trivabble.git Make the player name change button a discrete pencil button Thanks Arnaudv6 for the idea Ref: https://git.jakse.fr/trivabble/trivabble/issues/7#issuecomment-69 --- diff --git a/public/index.html b/public/index.html index b539a51..7640739 100644 --- a/public/index.html +++ b/public/index.html @@ -28,7 +28,7 @@

Game number: (pending)

-

You are: (name to give)

+

You are: (name to give)

diff --git a/public/trivabble.js b/public/trivabble.js index 44d788e..e0ec713 100644 --- a/public/trivabble.js +++ b/public/trivabble.js @@ -2473,10 +2473,12 @@ document.documentElement.setAttribute("xml:lang", libD.lang); for (const node of [].slice.call(document.querySelectorAll("[data-l10n]"))) { - if (node.dataset.l10n === "text-content") { - node.textContent = _(node.textContent.trim()); - } else { - node.setAttribute(node.dataset.l10n, _(node.getAttribute(node.dataset.l10n))); + for (const e of node.dataset.l10n.split(",")) { + if (e === "text-content") { + node.textContent = _(node.textContent.trim()); + } else { + node.setAttribute(e, _(node.getAttribute(e))); + } } }