diff --git a/package-lock.json b/package-lock.json index 41610f5b..d884fa01 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20577,9 +20577,9 @@ } }, "yt-comment-scraper": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/yt-comment-scraper/-/yt-comment-scraper-1.3.3.tgz", - "integrity": "sha512-t0mIJOxsXriJTVIzQpRYz7BcAo2SbhhgY8YR2HJjxEq5zBYsu6mVujs8xzrCo1431hri1mDTanvLluS/WWCgjg==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/yt-comment-scraper/-/yt-comment-scraper-1.3.4.tgz", + "integrity": "sha512-/sf4hmjHBNtGItrZiHWetWwp3Q66G0Ur1HGKsP0Enfpxsq4/1otrie11dPCINl4oBmt5qQ0jVJt5j44zvom4Xg==", "requires": { "axios": "^0.19.2", "html2json": "^1.0.2" diff --git a/package.json b/package.json index fa1929f0..f47c0927 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "youtube-chat": "^1.1.0", "youtube-suggest": "^1.1.0", "yt-channel-info": "^1.1.3", - "yt-comment-scraper": "^1.3.3", + "yt-comment-scraper": "^1.3.4", "yt-dash-manifest-generator": "^1.1.0", "yt-trending-scraper": "^1.0.3", "yt-xml2vtt": "^1.1.2", diff --git a/src/renderer/components/watch-video-comments/watch-video-comments.js b/src/renderer/components/watch-video-comments/watch-video-comments.js index 61fa8567..61890fd2 100644 --- a/src/renderer/components/watch-video-comments/watch-video-comments.js +++ b/src/renderer/components/watch-video-comments/watch-video-comments.js @@ -4,7 +4,7 @@ import FtCard from '../ft-card/ft-card.vue' import FtLoader from '../../components/ft-loader/ft-loader.vue' import FtSelect from '../../components/ft-select/ft-select.vue' import FtTimestampCatcher from '../../components/ft-timestamp-catcher/ft-timestamp-catcher.vue' - +import autolinker from 'autolinker' import CommentScraper from 'yt-comment-scraper' export default Vue.extend({ @@ -121,7 +121,7 @@ export default Vue.extend({ this.commentScraper.scrape_next_page_youtube_comments(this.id).then((response) => { if (response === null) { this.showToast({ - message: this.$t('No more comments available'), + message: this.$t('Comments.No more comments available'), time: 7000, action: () => { } @@ -150,6 +150,10 @@ export default Vue.extend({ if (this.hideCommentLikes) { comment.likes = null } + comment.text = autolinker.link(comment.text) + comment.replies.forEach((reply) => { + reply.text = autolinker.link(reply.text) + }) return comment }) this.commentData = this.commentData.concat(commentData) diff --git a/src/renderer/components/watch-video-comments/watch-video-comments.vue b/src/renderer/components/watch-video-comments/watch-video-comments.vue index 9692f77a..abebf4a2 100644 --- a/src/renderer/components/watch-video-comments/watch-video-comments.vue +++ b/src/renderer/components/watch-video-comments/watch-video-comments.vue @@ -96,9 +96,11 @@ {{ reply.time }}

-

- {{ reply.text }} -

+