mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 12:37:05 +03:00
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -67,12 +67,10 @@ jobs:
|
|||||||
uses: Shopify/upload-to-release@master
|
uses: Shopify/upload-to-release@master
|
||||||
with:
|
with:
|
||||||
args: builds/ChromeExtension.zip
|
args: builds/ChromeExtension.zip
|
||||||
env:
|
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Upload to release
|
- name: Upload to release
|
||||||
uses: Shopify/upload-to-release@master
|
uses: Shopify/upload-to-release@master
|
||||||
with:
|
with:
|
||||||
args: builds/FirefoxExtension.zip
|
args: builds/FirefoxExtension.zip
|
||||||
env:
|
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
|||||||
@@ -452,6 +452,7 @@ function cancelSponsorSchedule(): void {
|
|||||||
*/
|
*/
|
||||||
function startSponsorSchedule(currentTime?: number): void {
|
function startSponsorSchedule(currentTime?: number): void {
|
||||||
cancelSponsorSchedule();
|
cancelSponsorSchedule();
|
||||||
|
if (video.paused) return;
|
||||||
|
|
||||||
if (Config.config.disableSkipping || channelWhitelisted){
|
if (Config.config.disableSkipping || channelWhitelisted){
|
||||||
return;
|
return;
|
||||||
@@ -587,25 +588,25 @@ function sponsorsLookup(id: string, channelIDPromise?) {
|
|||||||
UUIDs = smallUUIDs;
|
UUIDs = smallUUIDs;
|
||||||
}
|
}
|
||||||
|
|
||||||
// See if there are any zero second sponsors
|
if (!video.paused && !switchingVideos) {
|
||||||
let zeroSecondSponsor = false;
|
// See if there are any starting sponsors
|
||||||
|
let startingSponsor: number = -1;
|
||||||
for (const time of sponsorTimes) {
|
for (const time of sponsorTimes) {
|
||||||
if (time[0] <= 0) {
|
if (time[0] <= video.currentTime && time[0] > startingSponsor) {
|
||||||
zeroSecondSponsor = true;
|
startingSponsor = time[0];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!zeroSecondSponsor) {
|
if (!startingSponsor) {
|
||||||
for (const time of sponsorTimesSubmitting) {
|
for (const time of sponsorTimesSubmitting) {
|
||||||
if (time[0] <= 0) {
|
if (time[0] <= video.currentTime && time[0] > startingSponsor) {
|
||||||
zeroSecondSponsor = true;
|
startingSponsor = time[0];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!video.paused && !switchingVideos) {
|
if (startingSponsor !== -1) {
|
||||||
if (zeroSecondSponsor) {
|
|
||||||
startSponsorSchedule(0);
|
startSponsorSchedule(0);
|
||||||
} else {
|
} else {
|
||||||
startSponsorSchedule();
|
startSponsorSchedule();
|
||||||
|
|||||||
Reference in New Issue
Block a user