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

Implement YouTube Click to Load #978

Merged
merged 1 commit into from
Feb 3, 2022

Conversation

kzar
Copy link
Collaborator

@kzar kzar commented Dec 16, 2021

Add privacy protection from embedded YouTube videos and
playlists. Block third-party YouTube requests and display a
placeholder for the corresponding element that allows users to
unblock the content again. Where possible, also upgrade embedded
videos to use youtube-nocookie.com.

Reviewer: @jonathanKingston

CC: @ladamski, @kdzwinel, @Charlie-belmer, @sammacbeth

Steps to test this PR:

  1. Add the following entry to your social_ctp_configuration.json file: https://gist.github.com/kzar/89bc3b8971daef09334da5a0799589c0
  2. Navigate to the YouTube test page and follow the instructions: https://privacy-test-pages.glitch.me/privacy-protections/youtube-click-to-load/

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 added the WIP label Dec 16, 2021
Copy link
Collaborator

@jonathanKingston jonathanKingston left a comment

Choose a reason for hiding this comment

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

Looking good, I left some general comments but haven't tested it out yet. :)

Copy link
Collaborator Author

@kzar kzar left a comment

Choose a reason for hiding this comment

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

Thanks for the feedback!

@jonathanKingston jonathanKingston marked this pull request as draft January 12, 2022 19:50
@kzar kzar force-pushed the youtube-clicktoplay-review branch from fd02f9c to f2da1a8 Compare January 21, 2022 17:48
@kzar kzar changed the title WIP - Implement YouTube Click to Play Implement YouTube Click to Load Jan 21, 2022
@kzar kzar force-pushed the youtube-clicktoplay-review branch 3 times, most recently from d651e7a to 4de24ce Compare January 25, 2022 15:50
@kzar kzar marked this pull request as ready for review January 25, 2022 15:51
@kzar kzar force-pushed the youtube-clicktoplay-review branch from 4de24ce to 94e7e74 Compare January 25, 2022 17:00
@kzar kzar removed the WIP label Jan 25, 2022
@kzar kzar force-pushed the youtube-clicktoplay-review branch 4 times, most recently from 9410a60 to 3b95aa8 Compare January 27, 2022 18:47
@kzar kzar requested a review from kdzwinel January 31, 2022 10:31
Copy link
Collaborator

@sammacbeth sammacbeth left a comment

Choose a reason for hiding this comment

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

Looks great! I just have some minor formatting comments, otherwise I don't see anything major. If you could fix the console errors in Firefox I think we'll be good to merge.

integration-test/helpers/requests.js Outdated Show resolved Hide resolved
integration-test/helpers/requests.js Outdated Show resolved Hide resolved
shared/data/web_accessible_resources/youtube-iframe-api.js Outdated Show resolved Hide resolved
shared/js/content-scripts/click-to-load.js Show resolved Hide resolved
@kzar kzar force-pushed the youtube-clicktoplay-review branch from 3b95aa8 to a82de14 Compare February 3, 2022 16:42
Add privacy protection from embedded YouTube videos and
playlists. Block third-party YouTube requests and display a
placeholder for the corresponding element that allows users to
unblock the content again. Where possible, also upgrade embedded
videos to use youtube-nocookie.com.
@kzar kzar force-pushed the youtube-clicktoplay-review branch from a82de14 to fd51f26 Compare February 3, 2022 16:54
Copy link
Collaborator

@sammacbeth sammacbeth left a comment

Choose a reason for hiding this comment

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

Thanks for the fixes. LGTM

@kzar kzar merged commit a296f3a into duckduckgo:develop Feb 3, 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