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