mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2026-01-07 00:59:04 +03:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e49bb73c5 | ||
|
|
5158020293 | ||
|
|
feaf80ad1e | ||
|
|
7fbd89159e | ||
|
|
716861da18 | ||
|
|
d0a34d423c |
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
# Build Artifacts
|
# Build Artifacts
|
||||||
- name: Build Artifacts
|
- name: Build Artifacts
|
||||||
uses: ./.github/workflows/ci
|
uses: ./.github/workflows/ci.yml
|
||||||
|
|
||||||
# Upload each release asset
|
# Upload each release asset
|
||||||
- name: Upload to release
|
- name: Upload to release
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"name": "__MSG_betaName__"
|
"name": "BETA - SponsorBlock"
|
||||||
}
|
}
|
||||||
|
|
||||||
8
manifest/firefox-beta-manifest-extra.json
Normal file
8
manifest/firefox-beta-manifest-extra.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"browser_specific_settings": {
|
||||||
|
"gecko": {
|
||||||
|
"id": "sponsorBlockerBETA@ajay.app"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "__MSG_fullName__",
|
"name": "__MSG_fullName__",
|
||||||
"short_name": "__MSG_Name__",
|
"short_name": "__MSG_Name__",
|
||||||
"version": "1.2.16",
|
"version": "1.2.17",
|
||||||
"default_locale": "en",
|
"default_locale": "en",
|
||||||
"description": "__MSG_Description__",
|
"description": "__MSG_Description__",
|
||||||
"content_scripts": [{
|
"content_scripts": [{
|
||||||
|
|||||||
@@ -385,7 +385,7 @@
|
|||||||
"message": "Minimum duration (seconds):"
|
"message": "Minimum duration (seconds):"
|
||||||
},
|
},
|
||||||
"minDurationDescription": {
|
"minDurationDescription": {
|
||||||
"message": "Sponsor segments shorter than the set value will not be skipeed or show in the player."
|
"message": "Sponsor segments shorter than the set value will not be skipped or show in the player."
|
||||||
},
|
},
|
||||||
"shortCheck": {
|
"shortCheck": {
|
||||||
"message": "The following submission is shorter than your minimum duration option. This could mean that this is already submitted, and just being ignored due to this option. Are you sure you would like to submit?"
|
"message": "The following submission is shorter than your minimum duration option. This could mean that this is already submitted, and just being ignored due to this option. Are you sure you would like to submit?"
|
||||||
@@ -423,9 +423,6 @@
|
|||||||
"whatUnlistedCheck": {
|
"whatUnlistedCheck": {
|
||||||
"message": "This setting will significantly slow down SponsorBlock. Sponsor lookups require sending the video ID to the server. If you are concerned about unlisted video IDs being sent over the internet, enable this option."
|
"message": "This setting will significantly slow down SponsorBlock. Sponsor lookups require sending the video ID to the server. If you are concerned about unlisted video IDs being sent over the internet, enable this option."
|
||||||
},
|
},
|
||||||
"betaName": {
|
|
||||||
"message": "BETA - SponsorBlock"
|
|
||||||
},
|
|
||||||
"mobileUpdateInfo": {
|
"mobileUpdateInfo": {
|
||||||
"message": "m.youtube.com is now supported"
|
"message": "m.youtube.com is now supported"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,9 @@ var lastPreviewBarUpdate;
|
|||||||
//whether the duration listener listening for the duration changes of the video has been setup yet
|
//whether the duration listener listening for the duration changes of the video has been setup yet
|
||||||
var durationListenerSetUp = false;
|
var durationListenerSetUp = false;
|
||||||
|
|
||||||
|
// Has a zero second sponsor been skipped yet
|
||||||
|
var skippedZeroSecond = false;
|
||||||
|
|
||||||
//the channel this video is about
|
//the channel this video is about
|
||||||
var channelURL;
|
var channelURL;
|
||||||
|
|
||||||
@@ -247,6 +250,8 @@ function resetValues() {
|
|||||||
|
|
||||||
//reset sponsor data found check
|
//reset sponsor data found check
|
||||||
sponsorDataFound = false;
|
sponsorDataFound = false;
|
||||||
|
|
||||||
|
skippedZeroSecond = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function videoIDChange(id) {
|
async function videoIDChange(id) {
|
||||||
@@ -455,6 +460,8 @@ function startSponsorSchedule(currentTime?: number): void {
|
|||||||
|
|
||||||
let skippingFunction = () => {
|
let skippingFunction = () => {
|
||||||
if (video.currentTime >= skipTime[0] && video.currentTime < skipTime[1]) {
|
if (video.currentTime >= skipTime[0] && video.currentTime < skipTime[1]) {
|
||||||
|
if (currentTime == 0) skippedZeroSecond = true;
|
||||||
|
|
||||||
skipToTime(video, skipInfo.index, skipInfo.array, skipInfo.openNotice);
|
skipToTime(video, skipInfo.index, skipInfo.array, skipInfo.openNotice);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -562,7 +569,7 @@ function sponsorsLookup(id: string, channelIDPromise?) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (zeroSecondSponsor) {
|
if (zeroSecondSponsor && !skippedZeroSecond) {
|
||||||
startSponsorSchedule(0);
|
startSponsorSchedule(0);
|
||||||
} else {
|
} else {
|
||||||
startSponsorSchedule();
|
startSponsorSchedule();
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ const manifest = require("../manifest/manifest.json");
|
|||||||
const firefoxManifestExtra = require("../manifest/firefox-manifest-extra.json");
|
const firefoxManifestExtra = require("../manifest/firefox-manifest-extra.json");
|
||||||
const chromeManifestExtra = require("../manifest/chrome-manifest-extra.json");
|
const chromeManifestExtra = require("../manifest/chrome-manifest-extra.json");
|
||||||
const betaManifestExtra = require("../manifest/beta-manifest-extra.json");
|
const betaManifestExtra = require("../manifest/beta-manifest-extra.json");
|
||||||
|
const firefoxBetaManifestExtra = require("../manifest/firefox-beta-manifest-extra.json");
|
||||||
|
|
||||||
// schema for options object
|
// schema for options object
|
||||||
const schema = {
|
const schema = {
|
||||||
@@ -46,6 +47,10 @@ class BuildManifest {
|
|||||||
|
|
||||||
if (this.options.stream === "beta") {
|
if (this.options.stream === "beta") {
|
||||||
mergeObjects(manifest, betaManifestExtra);
|
mergeObjects(manifest, betaManifestExtra);
|
||||||
|
|
||||||
|
if (this.options.browser.toLowerCase() === "firefox") {
|
||||||
|
mergeObjects(manifest, firefoxBetaManifestExtra);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let result = JSON.stringify(manifest);
|
let result = JSON.stringify(manifest);
|
||||||
|
|||||||
Reference in New Issue
Block a user