aboutsummaryrefslogtreecommitdiffhomepage
path: root/background.js
diff options
context:
space:
mode:
Diffstat (limited to 'background.js')
-rw-r--r--background.js12
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});
+ });
}
});
}