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
This commit is contained in:
Svallinn 2021-03-06 18:23:56 +00:00 committed by GitHub
parent 3e959d3e27
commit 1452e361a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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