Skip to content

Commit

Permalink
Fix loading
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed Aug 15, 2024
1 parent 1267d33 commit d6202ad
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions content/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
code[data-run] {
white-space: pre-wrap;
}
#loader {
display: none;
}
</style>
</head>
<body>
Expand Down Expand Up @@ -71,13 +74,16 @@
</div>
</div>

<div id="loader"></div>

<script>
const styles = `
.jp-CodeConsole-banner {
display: none;
}
`;
var styleSheet = document.createElement("style")
var styleSheet = document.createElement("style");
const loader = document.getElementById('loader');
styleSheet.textContent = styles;

for (const codeEl of document.querySelectorAll('code[data-run]')) {
Expand Down Expand Up @@ -109,10 +115,10 @@
iframe.contentDocument.head.appendChild(styleSheet);
codeEl.replaceWith(iframe);
}
loader.appendChild(iframe);
}
</script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>

</body>
</html>

0 comments on commit d6202ad

Please sign in to comment.