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-stellar-network.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/js/arching-kaos-stellar-network.js') diff --git a/src/js/arching-kaos-stellar-network.js b/src/js/arching-kaos-stellar-network.js index bcc0f5f..b05770b 100644 --- a/src/js/arching-kaos-stellar-network.js +++ b/src/js/arching-kaos-stellar-network.js @@ -25,13 +25,14 @@ function getNumberOfTrustlinesAndRenderThem(json){ function renderStellarAddress(stellarAddress){ if (!document.querySelector('.stellar-network').querySelector('#'+stellarAddress)){ var stats = document.querySelector('.stellar-network'); - var d = document.createElement("details"); - d.className = "stellar-address"; - var s = document.createElement("summary"); - s.innerText = stellarAddress; - d.id = stellarAddress; - d.appendChild(s); - stats.appendChild(d); + var d = { + element:"details", + className:"stellar-address", + innerHTML:[ + {element:"summary", innerText:stellarAddress, id:stellarAddress} + ] + }; + makeElement(d, stats); } } -- cgit v1.2.3