From: Raphaƫl Jakse Date: Thu, 8 May 2025 10:36:07 +0000 (+0200) Subject: Misc: coding style X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=6606868e3d619be05745e9074fb71615bbf7273c;p=trivabble.git Misc: coding style * Use a variable instead of repeating document.getElementById("panel") --- diff --git a/public/trivabble.js b/public/trivabble.js index e040e75..4eab158 100644 --- a/public/trivabble.js +++ b/public/trivabble.js @@ -825,10 +825,11 @@ location.reload(); }, function () { blockMove = 1000; - document.getElementById("panel").appendChild(document.createElement("a")); - document.getElementById("panel").lastChild.href = "#"; - document.getElementById("panel").lastChild.onclick = location.reload.bind(location); - document.getElementById("panel").lastChild.textContent = _("To continue playing, click here"); + const panel = document.getElementById("panel"); + panel.appendChild(document.createElement("a")); + panel.lastChild.href = "#"; + panel.lastChild.onclick = location.reload.bind(location); + panel.lastChild.textContent = _("To continue playing, click here"); } ); }