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

@@ -131,6 +131,18 @@ function submitTimes(videoID, callback) {
});
});
}
//add these to the storage log
chrome.storage.sync.get(["sponsorTimesContributed"], function(result) {
let currentContributionAmount = 0;
if (result.sponsorTimesContributed != undefined) {
//current contribution amount is known
currentContributionAmount = result.sponsorTimesContributed;
}
//save the amount contributed
chrome.storage.sync.set({"sponsorTimesContributed": currentContributionAmount + sponsorTimes.length});
});
}
});
}