Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge autofill code into a component #2378

Merged
merged 2 commits into from
Jan 19, 2024

Conversation

sammacbeth
Copy link
Collaborator

@sammacbeth sammacbeth commented Dec 8, 2023

The prime motivation here was to add guards around use of the contextMenus API, so the extension doesn't instantly crash on platforms that don't support this API (Firefox for Android and Safari). However, I also took the liberty of refactoring the autofill code to move as much of it as possible together into a single file, as it is current spread over quite a few places, making it difficult to track what's going on.

Unfortunately, the diff is not very helpful, but all this is, is the code from email-utils put into a class, and all the message-handler functions, previously in message-handlers.js are moved to be member functions of that class. Then I also merged the initialization code from events.js and startup.js into the constructor and init functions of this class.

Copy link
Member

@GioSensation GioSensation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple fo minor questions, but approved. This is awesome. Thanks for refactoring! ❤️

@sammacbeth sammacbeth merged commit 984ffb4 into duckduckgo:main Jan 19, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants