diff options
author | Ajay Ramachandran <[email protected]> | 2019-07-22 19:08:21 -0400 |
---|---|---|
committer | Ajay Ramachandran <[email protected]> | 2019-07-22 19:08:21 -0400 |
commit | 1040868ebb1c28da539d4821510fad33e69aa5b1 (patch) | |
tree | acac31891226e9d38270afef9bc7960115452026 /background.js | |
parent | b7a35f0823d399d5538f40c80fcf414f33ad0d40 (diff) | |
download | SponsorBlock-1040868ebb1c28da539d4821510fad33e69aa5b1.tar.gz SponsorBlock-1040868ebb1c28da539d4821510fad33e69aa5b1.zip |
Added small notice of how many submissions this user has made.
Diffstat (limited to 'background.js')
-rw-r--r-- | background.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/background.js b/background.js index 1c1c3ad6..07743435 100644 --- a/background.js +++ b/background.js @@ -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}); + }); } }); } |