simplify updateSpaceApiJson

This commit is contained in:
Thomas Rupprecht 2023-01-05 14:29:15 +01:00
parent 6c95aa978e
commit 859f9bce19
1 changed files with 1 additions and 7 deletions

View File

@ -109,14 +109,8 @@ function updateNextEvent(nextEvents) {
* @param {object} spaceApi
*/
function updateSpaceApiJson(spaceApi) {
const json = JSON.stringify(spaceApi, null, 2)
.replace(/ /g, ' ')
.replace(/\n/g, '<br/>');
const spaceApiElement = document.querySelector('#space-api > code');
spaceApiElement.innerHTML = json;
// const jsonNode = document.createTextNode(json);
// spaceApiElement.innerText = '';
// spaceApiElement.append(jsonNode);
spaceApiElement.textContent = JSON.stringify(spaceApi, null, 2);
}
/**