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

Confirmation before connecting to youtube.com/youtu.be #4826

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

unlxam
Copy link

@unlxam unlxam commented Aug 10, 2024

Closes #4798

I also thought that since we are adding a confirmation before going to youtube.com/youtu.be in the "Watch on YouTube (Embed)" and "[YT]" in the comments. It would make sense adding also to external domains from links in the description and comments too. What you think about that?

@unlxam unlxam requested a review from a team as a code owner August 10, 2024 21:43
@unlxam unlxam requested review from SamantazFox and removed request for a team August 10, 2024 21:43
src/invidious/routes/misc.cr Outdated Show resolved Hide resolved
src/invidious/views/confirm_leave.ecr Show resolved Hide resolved
src/invidious/frontend/comments_youtube.cr Show resolved Hide resolved
@@ -303,6 +303,7 @@ module Invidious::Comments
if format == "html"
response = JSON.parse(response)
content_html = Frontend::Comments.template_youtube(response, locale, thin_mode)
content_html = Comments.replace_external_links(content_html)
Copy link
Member

Choose a reason for hiding this comment

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

Can you explain why you added this here? Is it because you missed one link to replace, as mentioned here?

Copy link
Author

Choose a reason for hiding this comment

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

This was for replacing the links on comments with the confirmation page, such as when creators pin their own with links from Discord or Twitch.

@SamantazFox
Copy link
Member

Also, I realized that there was #4667 pending. I merged, so can you rebase your change on that please?

@unlxam unlxam force-pushed the confirm-leave branch 2 times, most recently from 28b8149 to 33b30c9 Compare August 24, 2024 14:39
@unlxam
Copy link
Author

unlxam commented Aug 25, 2024

Also, I realized that there was #4667 pending. I merged, so can you rebase your change on that please?

Rebased, since this PR goes directly with the feature of the confirmation page, I added the rel="noreferrer noopener" to it too, and replaced the external youtube.com links change by #4667 to pass through the confirmation.
Edit: I forgot to mention that I added the function to replace the links to the channel about/description too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants