Use segment count from the API

This commit is contained in:
Ajay Ramachandran
2021-07-06 01:35:39 -04:00
parent 584cfd4ff8
commit b066945331

View File

@@ -168,12 +168,9 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
PageElements.usernameValue.innerText = userInfo.userName;
//get the amount of times this user has contributed and display it to thank them
if (Config.config.sponsorTimesContributed != undefined) {
PageElements.sponsorTimesContributionsDisplay.innerText = Config.config.sponsorTimesContributed.toLocaleString();
PageElements.sponsorTimesContributionsDisplay.innerText = userInfo.segmentCount.toLocaleString();
PageElements.sponsorTimesContributionsContainer.classList.remove("hidden");
//get the userID
const viewCount = userInfo.viewCount;
if (viewCount != 0) {
if (viewCount > 1) {
@@ -197,7 +194,6 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
PageElements.sponsorTimesOthersTimeSavedDisplay.innerText = getFormattedHours(minutesSaved);
}
}
}
//get the amount of times this user has skipped a sponsor
if (Config.config.skipCount != undefined) {