From 22bdc082a3fb26144f861732a971e091718a215f Mon Sep 17 00:00:00 2001 From: kaotisk Date: Mon, 11 Nov 2024 23:37:28 +0200 Subject: Refactoring using ak-generator --- src/js/arching-kaos-log.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/js/arching-kaos-log.js') diff --git a/src/js/arching-kaos-log.js b/src/js/arching-kaos-log.js index 67a9d37..1f79994 100644 --- a/src/js/arching-kaos-log.js +++ b/src/js/arching-kaos-log.js @@ -7,11 +7,12 @@ */ function archingKaosLog(message){ - var sta = document.createElement("div"); var lts = new Date(Date.now()); - var fmsg = lts.toISOString() + " " + message; - sta.innerText = fmsg - currentLogMessageElement.innerHTML = fmsg; - logsAreaElement.appendChild(sta); + var sta = { + element:"div", + innerText: lts.toISOString() + " " + message + }; + currentLogMessageElement.innerText = sta.innerText; + makeElement(sta, logsAreaElement); } // @license-end -- cgit v1.2.3