mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Downvoting now temporarily hides the sponsor time.
This commit is contained in:
parent
5feed6bfcc
commit
8f0a9d97f6
1 changed files with 18 additions and 0 deletions
18
content.js
18
content.js
|
@ -942,6 +942,24 @@ function afterDownvote(UUID) {
|
|||
//add element to div
|
||||
document.getElementById("sponsorTimesVoteButtonsContainer" + UUID).appendChild(thanksForVotingText);
|
||||
document.getElementById("sponsorTimesVoteButtonsContainer" + UUID).appendChild(thanksForVotingInfoText);
|
||||
|
||||
//remove this sponsor from the sponsors looked up
|
||||
//find which one it is
|
||||
let removeIndex = -1;
|
||||
for (let i = 0; i < sponsorTimes.length; i++) {
|
||||
if (UUIDs[i] == UUID) {
|
||||
//this one is the one to remove
|
||||
removeIndex = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (removeIndex != -1) {
|
||||
//remove this sponsor time
|
||||
sponsorTimes.splice(removeIndex, 1);
|
||||
|
||||
//update the preview
|
||||
previewBar.set(sponsorTimes, [], v.duration);
|
||||
}
|
||||
}
|
||||
|
||||
function addLoadingInfo(message, UUID) {
|
||||
|
|
Loading…
Reference in a new issue