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

Add Chrome MV3 support for user allowlisting #1464

Merged
merged 1 commit into from
Oct 27, 2022

Conversation

kzar
Copy link
Collaborator

@kzar kzar commented Oct 21, 2022

Users can allowlist (disable protections) for websites from the popup
UI and also from the options page. To make that work with Chrome MV3,
we need to add a declarativeNetRequest rule that ensures requests
initiated by domains that the user has allowlisted aren't blocked or
redirected.

Reviewer: @jdorweiler
CC: @jonathanKingston

Steps to test this PR:

  1. Produce a Chrome MV3 build of the extension (npm install && npm run dev-chrome-mv3).
  2. Install that in Chrome.
  3. Try allowlisting websites, both from the options page and the popup UI and ensure it works.
  4. Click to reload the extension from the extensions page.
  5. Make sure the websites you allowlisted are still allowlisted (try opening them in a new tab too).
  6. Remove any allowlisted websites from the options page and ensure they are no longer allowlisted.

Automated tests:

  • Unit tests
  • Integration tests
Reviewer Checklist:
  • Ensure the PR solves the problem
  • Review every line of code
  • Ensure the PR does no harm by testing the changes thoroughly
  • Get help if you're uncomfortable with any of the above!
  • Determine if there are any quick wins that improve the implementation
PR Author Checklist:
  • Get advice or leverage existing code
  • Agree on technical approach with reviewer (if the changes are nuanced)
  • Ensure that there is a testing strategy (and documented non-automated tests)
  • Ensure there is a documented monitoring strategy (if necessary)
  • Consider systems implications

@kzar kzar requested a review from jdorweiler October 21, 2022 11:34
@kzar kzar force-pushed the mv3-options-allowlisting branch 2 times, most recently from 8ccbc70 to 61eb183 Compare October 21, 2022 11:38
@kzar kzar force-pushed the mv3-options-allowlisting branch 2 times, most recently from ac3bd45 to e3c2b3f Compare October 25, 2022 12:04
@jdorweiler
Copy link
Contributor

I'm getting the same startup error I was seeing in #1450 when I tried to include the declarative net module.
Screen Shot 2022-10-25 at 7 57 21 AM

@kzar
Copy link
Collaborator Author

kzar commented Oct 25, 2022

I'm getting the same startup error I was seeing in #1450 when I tried to include the declarative net module. Screen Shot 2022-10-25 at 7 57 21 AM

@jdorweiler Dang, yea I have also seen that one cropping up. I'm going to file a follow-up task to investigate, it seems only tangentially (if at all) related to these changes.

@kzar kzar marked this pull request as draft October 25, 2022 16:17
@jonathanKingston
Copy link
Collaborator

jonathanKingston commented Oct 26, 2022

Ignore I see you raised: https://app.asana.com/0/892838074342800/1203229345565679/f

Users can allowlist (disable protections) for websites from the popup
UI and also from the options page. To make that work with Chrome MV3,
we need to add a declarativeNetRequest rule that ensures requests
initiated by domains that the user has allowlisted aren't blocked or
redirected.
@kzar kzar marked this pull request as ready for review October 26, 2022 15:50
@kzar kzar marked this pull request as draft October 26, 2022 18:18
@jdorweiler
Copy link
Contributor

@kzar looks good, I think you're just missing the page reload when toggling

@kzar kzar marked this pull request as ready for review October 27, 2022 12:55
@kzar kzar merged commit 6710367 into duckduckgo:develop Oct 27, 2022
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.

None yet

3 participants