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 26b49aa commit 9480e6e
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/pages/wiki/software/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -56,24 +56,4 @@ const slugify = (str: string) => {
</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 9480e6e

Please sign in to comment.