Skip to content

Commit

Permalink
Merge pull request #11 from brown9804/feat-testpatterns
Browse files Browse the repository at this point in the history
testing patterns
  • Loading branch information
brown9804 authored Jan 27, 2025
2 parents e5c42fd + b91a2f8 commit 4068be5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ <h1>Badge Generator</h1>
<div id="badgePreview"></div>
<button id="downloadSVGButton" style="display:none;">Download SVG</button>
<button id="downloadPNGButton" style="display:none;">Download PNG</button>
<script src="badgeGenerator.js"></script>
<script src="script.js"></script>
</body>
</html>
8 changes: 2 additions & 6 deletions src/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@ document.getElementById('badgeForm').addEventListener('submit', function(event)
});

document.getElementById('clearButton').addEventListener('click', function() {
// Clear number and text input fields
const inputs = document.querySelectorAll('#badgeForm input[type="number"], #badgeForm input[type="text"]');
inputs.forEach(input => {
input.value = '';
});

// Clear the form and result display
document.getElementById('badgeForm').reset();
document.getElementById('badgePreview').innerHTML = '';
document.getElementById('regenerateMessage').style.display = 'none'; // Hide the message when form is cleared
document.getElementById('downloadSVGButton').style.display = 'none'; // Hide the download button when form is cleared
Expand Down

0 comments on commit 4068be5

Please sign in to comment.