Added small notice of how many submissions this user has made.

This commit is contained in:
Ajay Ramachandran
2019-07-22 19:08:21 -04:00
parent b7a35f0823
commit 1040868ebb
4 changed files with 35 additions and 1 deletions

View File

@@ -38,6 +38,20 @@ chrome.storage.sync.get(["hideVideoPlayerControls"], function(result) {
}
});
//get the amount of times this user has contributed and display it to thank them
chrome.storage.sync.get(["sponsorTimesContributed"], function(result) {
if (result.sponsorTimesContributed != undefined) {
let sponsorTimesContributionsDisplay = document.getElementById("sponsorTimesContributionsDisplay");
if (result.sponsorTimesContributed > 1) {
sponsorTimesContributionsDisplay.innerText = "So far, you've submitted " + result.sponsorTimesContributed + " sponsor times.";
} else {
sponsorTimesContributionsDisplay.innerText = "So far, you've submitted " + result.sponsorTimesContributed + " sponsor time.";
}
sponsorTimesContributionsDisplay.style.display = "unset";
}
});
chrome.tabs.query({
active: true,
currentWindow: true