mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Made it ignore rate limits for voting.
This commit is contained in:
parent
ef1b96bbf1
commit
04190b27d8
2 changed files with 4 additions and 4 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue