diff --git a/app/components/client/playground-scripts.js b/app/components/client/playground-scripts.js index db3b836..7a17f9f 100644 --- a/app/components/client/playground-scripts.js +++ b/app/components/client/playground-scripts.js @@ -268,9 +268,7 @@ const handleExamples = debounce(event => { if (document.getElementById("playground-url").style.display === "none") document.getElementById("playground-url").removeAttribute("style"); - for (const example of document.querySelectorAll(".playground-navigation__example")) - example.classList.remove("active"); - + document.querySelectorAll(".playground-navigation__example").forEach(example => example.classList.remove("active")); document.querySelector(".playground-navigation__example:nth-child(1)").classList.add("active"); document.getElementById("playground-loader").innerHTML = ""; @@ -294,9 +292,7 @@ const handleExamples = debounce(event => { document.getElementById("fetch-claim-uri").value = ""; // reset URL bar document.getElementById("playground-url").style.display = "none"; - for (const example of document.querySelectorAll(".playground-navigation__example")) - example.classList.remove("active"); - + document.querySelectorAll(".playground-navigation__example").forEach(example => example.classList.remove("active")); document.querySelector(".playground-navigation__example:nth-child(2)").classList.add("active"); document.getElementById("playground-loader").innerHTML = ""; @@ -323,9 +319,7 @@ const handleExamples = debounce(event => { if (document.getElementById("playground-url").style.display === "none") document.getElementById("playground-url").removeAttribute("style"); - for (const example of document.querySelectorAll(".playground-navigation__example")) - example.classList.remove("active"); - + document.querySelectorAll(".playground-navigation__example").forEach(example => example.classList.remove("active")); document.querySelector(".playground-navigation__example:nth-child(3)").classList.add("active"); document.getElementById("playground-loader").innerHTML = ""; diff --git a/app/components/playground.js b/app/components/playground.js index c4463a3..f0a60d7 100644 --- a/app/components/playground.js +++ b/app/components/playground.js @@ -28,10 +28,10 @@ export default () => dedent` function example1() { return html` -
+