popup.js:
- Using textContent to set text content, which avoids the risk of injecting HTML or script content inadvertently.
- Encapsulating functionality into smaller, reusable functions, which makes the code easier to read and maintain.
- Adding constants for IDs, class names, and messages to avoid typos and make changes easier.
- Adding error handling for Chrome API interactions, displaying messages to the user when something goes wrong.
popup.html:
- Improve Styling
popup.css:
- Improve styling
Full Changelog: v1.3...v1.4