mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-16 16:37:18 +03:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ccd4b8b37 | ||
|
|
c0894afff9 | ||
|
|
09f244150c | ||
|
|
efec8b320c | ||
|
|
e6ea9f77e9 | ||
|
|
0813aa4ba3 |
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -1,6 +1,8 @@
|
||||
name: Upload Release Build
|
||||
|
||||
on: release
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "__MSG_fullName__",
|
||||
"short_name": "__MSG_Name__",
|
||||
"version": "1.2.20",
|
||||
"version": "1.2.21",
|
||||
"default_locale": "en",
|
||||
"description": "__MSG_Description__",
|
||||
"content_scripts": [{
|
||||
|
||||
@@ -449,7 +449,7 @@ function startSponsorSchedule(currentTime?: number): void {
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentTime === undefined) currentTime = video.currentTime;
|
||||
if (currentTime === undefined || currentTime === null) currentTime = video.currentTime;
|
||||
|
||||
let skipInfo = getNextSkipIndex(currentTime);
|
||||
|
||||
@@ -459,11 +459,19 @@ function startSponsorSchedule(currentTime?: number): void {
|
||||
let timeUntilSponsor = skipTime[0] - currentTime;
|
||||
|
||||
let skippingFunction = () => {
|
||||
let forcedSkipTime: number = null;
|
||||
|
||||
if (video.currentTime >= skipTime[0] && video.currentTime < skipTime[1]) {
|
||||
skipToTime(video, skipInfo.index, skipInfo.array, skipInfo.openNotice);
|
||||
|
||||
if (Config.config.disableAutoSkip) {
|
||||
forcedSkipTime = skipTime[0] + 0.001;
|
||||
} else {
|
||||
forcedSkipTime = skipTime[1];
|
||||
}
|
||||
}
|
||||
|
||||
startSponsorSchedule(skipTime[0] + 0.001);
|
||||
startSponsorSchedule(forcedSkipTime);
|
||||
};
|
||||
|
||||
if (timeUntilSponsor <= 0) {
|
||||
@@ -495,6 +503,7 @@ function sponsorsLookup(id: string, channelIDPromise?) {
|
||||
switchingVideos = false;
|
||||
startSponsorSchedule();
|
||||
});
|
||||
video.addEventListener('playing', () => startSponsorSchedule());
|
||||
video.addEventListener('seeked', () => {
|
||||
if (!video.paused) startSponsorSchedule();
|
||||
});
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
import Config from "../config";
|
||||
|
||||
/**
|
||||
* The notice that tells the user that a sponsor was just skipped
|
||||
*/
|
||||
@@ -305,7 +307,7 @@ class SkipNotice {
|
||||
if (this.manualSkip) {
|
||||
this.changeNoticeTitle(chrome.i18n.getMessage("noticeTitle"));
|
||||
|
||||
this.contentContainer().vote(1, this.UUID, this);
|
||||
if (Config.config.autoUpvote) this.contentContainer().vote(1, this.UUID);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user