Added subscriber count in the channel page
This commit is contained in:
1 parent
15841cf5bf
commit
9315fa6cf7
4 files changed
+37
-3
No files matched your search
@@ -251,12 +251,34 @@ namespace InvidiousContent
|
||||
|
||||
function GetVideoCountText(item as object) as string
|
||||
videoCount = ValidInt(item.videoCount)
|
||||
return videoCount = 1 ? "1 video" : `${videoCount} videos`
|
||||
if videoCount = 1
|
||||
return "1 video"
|
||||
end if
|
||||
return `${videoCount} videos`
|
||||
end function
|
||||
|
||||
function GetChannelSubCountText(channel as object) as string
|
||||
subCount = ValidInt(channel.subCount)
|
||||
return subCount = 1 ? "1 subscriber" : `${subCount} subscribers`
|
||||
if subCount = 1
|
||||
return "1 subscriber"
|
||||
end if
|
||||
|
||||
if subCount < 1000
|
||||
return `${subCount} subscribers`
|
||||
end if
|
||||
|
||||
subCount = subCount / 1000
|
||||
if subCount < 1000
|
||||
return `${FormatFloat(subCount)}K subscribers`
|
||||
end if
|
||||
|
||||
subCount = subCount / 1000
|
||||
if subCount < 1000
|
||||
return `${FormatFloat(subCount)}M subscribers`
|
||||
end if
|
||||
|
||||
subCount = subCount / 1000
|
||||
return `${FormatFloat(subCount)}B subscribers`
|
||||
end function
|
||||
|
||||
function PlaylistGetViewCountText(playlistItem as object) as string
|
||||
|
||||
Reference in new issue
Block a user