Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Make YouTube Embeds GDPR compliant #3253
Make YouTube Embeds GDPR compliant #3253
Changes from 2 commits
e4a1a49
a10c1d1
ed03a29
8f84447
4ff8cbe
4388b0e
8eecca8
c1fa1a4
644fca6
c88e09e
eabc30d
5e25a5d
3d03fcf
6b2af71
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script takes all of our youtube embeds and attaches a click listener to our overlay. If the overlay is clicked, the video is played and the overlay disappears. It's definitely not very "reacty"... Does anybody have any ideas on how we could improve this?
Once we agree on a implementation (whether we deside to do this one or a different way) I want to have the code update local storage so that the message won't appear again if the user revisits the site :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bit of a shot in the dark, but is it possible to have the custom embedder return a custom tag like
<youtube>
and then attach a React component to ourrehype-react
custom components with this logic in it? That way we can use theremark-embedder
style of automatic URL grabbing with React JS more consistent with the rest of the site.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could try that but wouldn't that only work for our docs pages? We'd probably want a solution that works the same for blog and doc 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I forgot about our weird divergent blog markdown.