forked from XimeX/usrspace-browser-addon
simplify updateSpaceApiJson
This commit is contained in:
parent
6c95aa978e
commit
859f9bce19
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue