From f39579c6d22c5bdf00918816f4d5e5eb706a7a37 Mon Sep 17 00:00:00 2001 From: Svallinn <41585298+Svallinn@users.noreply.github.com> Date: Tue, 30 Mar 2021 03:31:35 +0100 Subject: [PATCH] Stop replacing YouTube hrefs for protocol links --- .../watch-video-description/watch-video-description.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/renderer/components/watch-video-description/watch-video-description.js b/src/renderer/components/watch-video-description/watch-video-description.js index 3773e52d..e7a2eccb 100644 --- a/src/renderer/components/watch-video-description/watch-video-description.js +++ b/src/renderer/components/watch-video-description/watch-video-description.js @@ -55,9 +55,8 @@ export default Vue.extend({ descriptionText = descriptionText.replace(/&v.+?(?=")/g, '') descriptionText = descriptionText.replace(/&redirect-token.+?(?=")/g, '') descriptionText = descriptionText.replace(/&redir_token.+?(?=")/g, '') - descriptionText = descriptionText.replace(/href="http(s)?:\/\/youtube\.com/g, 'href="freetube://https://youtube.com') - descriptionText = descriptionText.replace(/href="\/watch/g, 'href="freetube://https://youtube.com') - descriptionText = descriptionText.replace(/href="\/results\?search_query=/g, 'href="freetube://') + descriptionText = descriptionText.replace(/href="\//g, 'href="https://www.youtube.com/') + // TODO: Implement hashtag support descriptionText = descriptionText.replace(/href="\/hashtag\//g, 'href="freetube://') descriptionText = descriptionText.replace(/yt\.www\.watch\.player\.seekTo/g, 'changeDuration')