Skip to content

Commit

Permalink
Update [...slug].astro
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilatte authored Oct 29, 2023
1 parent d567473 commit 26b49aa
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/pages/wiki/guides/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,5 @@ const { Content } = await entry.render();
</div>
</div>
<script src="/js/docs.js" is:inline></script>
<script>
function replaceCheckboxesWithImages() {
const checkboxes = document.querySelectorAll('input[type="checkbox"]');

checkboxes.forEach(checkbox => {
if (checkbox.hasAttribute('checked') && checkbox.hasAttribute('disabled')) {
checkbox.outerHTML = '<img src="/design/yes.jpg" width="25" height="25">';
} else if (checkbox.hasAttribute('disabled')) {
checkbox.outerHTML = '<img src="/design/no.jpg" width="25" height="25">';
}
});

// Remove the script element
const scriptElement = document.currentScript;
if (scriptElement) {
scriptElement.parentElement.removeChild(scriptElement);
}
}
replaceCheckboxesWithImages();
</script>

</Layout>

0 comments on commit 26b49aa

Please sign in to comment.