document.querySelectorAll("tr.child-of-item-75111").forEach((e) => e.remove()); template = document.createElement("template"); template.innerHTML = ""; document.querySelector("#item-75111").after(...template.content.children) template.remove() document.querySelector("#item-expand-link-75111").style.display = 'none'; document.querySelector("#item-collapse-link-75111").style.display = 'inline-block';