good first issuehacktoberfesthacktoberfest-acceptedhtmljavascript
Metriche repository
- Star
- (6 stelle)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
A "Clear All" button should let the user reset the form, removing all author entries at once.
Files to modify: popup.html, popup.js
How to do it:
-
Add a button to the popup:
<button type="button" id="clearAllBtn">Clear All</button> -
In
popup.js:document.getElementById('clearAllBtn').addEventListener('click', clearAllForms); function clearAllForms() { const container = document.getElementById('authorsContainer'); while (container.firstChild) { container.removeChild(container.firstChild); } addAuthorForm(); // Optionally, re-add a single blank form }