Stop replacing YouTube hrefs for protocol links

This commit is contained in:
Svallinn 2021-03-30 03:31:35 +01:00
parent f2330e4775
commit f39579c6d2
No known key found for this signature in database
GPG Key ID: 09FB527F34037CCA
1 changed files with 2 additions and 3 deletions

View File

@ -55,9 +55,8 @@ export default Vue.extend({
descriptionText = descriptionText.replace(/&v.+?(?=")/g, '') descriptionText = descriptionText.replace(/&v.+?(?=")/g, '')
descriptionText = descriptionText.replace(/&redirect-token.+?(?=")/g, '') descriptionText = descriptionText.replace(/&redirect-token.+?(?=")/g, '')
descriptionText = descriptionText.replace(/&redir_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="\//g, 'href="https://www.youtube.com/')
descriptionText = descriptionText.replace(/href="\/watch/g, 'href="freetube://https://youtube.com') // TODO: Implement hashtag support
descriptionText = descriptionText.replace(/href="\/results\?search_query=/g, 'href="freetube://')
descriptionText = descriptionText.replace(/href="\/hashtag\//g, 'href="freetube://') descriptionText = descriptionText.replace(/href="\/hashtag\//g, 'href="freetube://')
descriptionText = descriptionText.replace(/yt\.www\.watch\.player\.seekTo/g, 'changeDuration') descriptionText = descriptionText.replace(/yt\.www\.watch\.player\.seekTo/g, 'changeDuration')