From 6606868e3d619be05745e9074fb71615bbf7273c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Jakse?= Date: Thu, 8 May 2025 12:36:07 +0200 Subject: [PATCH] Misc: coding style * Use a variable instead of repeating document.getElementById("panel") --- public/trivabble.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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"); } ); } -- 2.30.2