-
Notifications
You must be signed in to change notification settings - Fork 146
Open
Description
📌 Summary
The current welcome.html includes inline JavaScript, which violates Chrome Extension Content Security Policy (CSP) rules and results in errors like:
In addition, there's no visual feedback for users when:
- API key is being validated
- An error occurs during validation
- Theme preferences are saved
✅ Proposed Enhancements
-
CSP Compliance
- Move all inline
<script>logic to an externalwelcome.jsfile - Ensures CSP compatibility for Chrome extension runtime
- Move all inline
-
Improved User Feedback
- Add visible error message when API key is missing or invalid
- Show a loading indicator or disable button during API key validation
- Add success message when key is saved
-
Consistent Theme Handling
- Use
chrome.storage.localinstead oflocalStorageto store theme mode (dark/light) - Sync behavior with
popup.jsfor a consistent experience
- Use
💡 Benefits
- Resolves CSP violations and ensures proper extension loading
- Improves usability by providing clear feedback
- Makes code cleaner and more maintainable
📁 Files Affected
popup/welcome.htmlpopup/welcome.jspopup/popup.js(for storage consistency)
📎 Related PR
These changes are already implemented and proposed in PR #158
Let me know if you'd like me to update anything!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels