mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2026-02-01 07:10:59 +03:00
Added option for auto-vote.
This commit is contained in:
3
popup.js
3
popup.js
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user