0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-29 22:53:05 +00:00

commas in dislikes and views

This commit is contained in:
Sushi 2022-03-20 10:57:16 -06:00
parent 5e4fd90a44
commit 976aea5fb6

View file

@ -67,8 +67,6 @@ export default {
showMore: false,
title: null,
likes: null,
dislikes: null,
uploaded: null,
vidSrc: null,
description: null,
@ -84,20 +82,17 @@ export default {
this.vidSrc = result.streamingData.formats[result.streamingData.formats.length-1].url
this.title = result.videoDetails.title
this.description = result.videoDetails.shortDescription;
this.views = result.videoDetails.viewCount.toLocaleString();
this.views = result.videoDetails.viewCount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
});
this.$youtube.getRemainingVideoInfo(this.$route.query.v, (data) => {
this.likes = data.likes.toLocaleString();
this.uploaded = data.uploadDate;
this.interactions[0].value = data.likes;
this.interactions[0].value = data.likes.toString();
});
this.$youtube.getReturnYoutubeDislike(this.$route.query.v, (data) => {
this.dislikes = data.dislikes.toLocaleString();
this.interactions[1].value = data.dislikes.toLocaleString();
this.interactions[1].value = data.dislikes.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
});
}