From 1452e361a1a34c036d24f20ced9e552ce74e041d Mon Sep 17 00:00:00 2001 From: Svallinn <41585298+Svallinn@users.noreply.github.com> Date: Sat, 6 Mar 2021 18:23:56 +0000 Subject: [PATCH] Replace '/hashtag' refs with freetube:// links (#1076) When pulling video information from Invidious, hashtag-related links present in the description need to be replaced with valid links. In this case, a freetube:// link was deemed the most appropriate. Fixes #932 --- .../watch-video-description/watch-video-description.js | 1 + 1 file changed, 1 insertion(+) 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 e0592ebb..3773e52d 100644 --- a/src/renderer/components/watch-video-description/watch-video-description.js +++ b/src/renderer/components/watch-video-description/watch-video-description.js @@ -58,6 +58,7 @@ export default Vue.extend({ 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="\/hashtag\//g, 'href="freetube://') descriptionText = descriptionText.replace(/yt\.www\.watch\.player\.seekTo/g, 'changeDuration') return descriptionText