mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 21:47:06 +03:00
Made it ignore rate limits for voting.
This commit is contained in:
@@ -879,8 +879,8 @@ function vote(type, UUID, skipNotice) {
|
|||||||
if (response != undefined) {
|
if (response != undefined) {
|
||||||
//see if it was a success or failure
|
//see if it was a success or failure
|
||||||
if (skipNotice != null) {
|
if (skipNotice != null) {
|
||||||
if (response.successType == 1) {
|
if (response.successType == 1 || (response.successType == -1 && response.statusCode == 429)) {
|
||||||
//success
|
//success (treat rate limits as a success)
|
||||||
if (type == 0) {
|
if (type == 0) {
|
||||||
skipNotice.afterDownvote.bind(skipNotice)();
|
skipNotice.afterDownvote.bind(skipNotice)();
|
||||||
}
|
}
|
||||||
|
|||||||
4
popup.js
4
popup.js
@@ -1102,8 +1102,8 @@ function runThePopup() {
|
|||||||
}, function(response) {
|
}, function(response) {
|
||||||
if (response != undefined) {
|
if (response != undefined) {
|
||||||
//see if it was a success or failure
|
//see if it was a success or failure
|
||||||
if (response.successType == 1) {
|
if (response.successType == 1 || (response.successType == -1 && response.statusCode == 429)) {
|
||||||
//success
|
//success (treat rate limits as a success)
|
||||||
addVoteMessage(chrome.i18n.getMessage("voted"), UUID)
|
addVoteMessage(chrome.i18n.getMessage("voted"), UUID)
|
||||||
} else if (response.successType == 0) {
|
} else if (response.successType == 0) {
|
||||||
//failure: duplicate vote
|
//failure: duplicate vote
|
||||||
|
|||||||
Reference in New Issue
Block a user