mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-14 07:27:05 +03:00
Use segment count from the API
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user