Skip to content

Commit

Permalink
Add custom event for SponsorBlock
Browse files Browse the repository at this point in the history
  • Loading branch information
ajayyy committed Dec 15, 2020
1 parent d8333fb commit 113ec89
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,10 @@ function setupListener() {
if (coolDown) {
log("Speed event propagation blocked", 4);
event.stopImmediatePropagation();

// Send custom event for other extensions
const customEvent = new Event('videoSpeed_ratechange');
event.target.dispatchEvent(customEvent);
}
var video = event.target;

Expand Down

0 comments on commit 113ec89

Please sign in to comment.