Added option for auto-vote.

This commit is contained in:
Ajay Ramachandran
2020-01-10 20:06:16 -05:00
parent 5c227f445a
commit 7335429541
5 changed files with 27 additions and 5 deletions

View File

@@ -231,7 +231,6 @@ async function runThePopup() {
}
//load video times for this video
setTimeout(()=> console.log( SB.config.sponsorTimes.set), 200 )
let sponsorTimesStorage = SB.config.sponsorTimes.get(currentVideoID);
if (sponsorTimesStorage != undefined && sponsorTimesStorage.length > 0) {
if (sponsorTimesStorage[sponsorTimesStorage.length - 1] != undefined && sponsorTimesStorage[sponsorTimesStorage.length - 1].length < 2) {
@@ -919,10 +918,8 @@ async function runThePopup() {
type: type,
UUID: UUID
}, function(response) {
console.log(response)
if (response != undefined) {
//see if it was a success or failure
console.log(response)
if (response.successType == 1 || (response.successType == -1 && response.statusCode == 429)) {
//success (treat rate limits as a success)
addVoteMessage(chrome.i18n.getMessage("voted"), UUID)