mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 12:37:05 +03:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6de1a58d88 | ||
|
|
43a9ba0f9e | ||
|
|
c3489e54a6 | ||
|
|
75c003b204 | ||
|
|
da5de43121 |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "__MSG_fullName__",
|
||||
"short_name": "SponsorBlock",
|
||||
"version": "3.0.2",
|
||||
"version": "3.0.3",
|
||||
"default_locale": "en",
|
||||
"description": "__MSG_Description__",
|
||||
"homepage_url": "https://sponsor.ajay.app",
|
||||
|
||||
@@ -675,7 +675,8 @@ async function sponsorsLookup(id: string, keepOldSubmissions = true) {
|
||||
// Hide all submissions smaller than the minimum duration
|
||||
if (Config.config.minDuration !== 0) {
|
||||
for (let i = 0; i < sponsorTimes.length; i++) {
|
||||
if (sponsorTimes[i].segment[1] - sponsorTimes[i].segment[0] < Config.config.minDuration) {
|
||||
if (sponsorTimes[i].segment[1] - sponsorTimes[i].segment[0] < Config.config.minDuration
|
||||
&& getCategoryActionType(sponsorTimes[i].category) !== CategoryActionType.POI) {
|
||||
sponsorTimes[i].hidden = SponsorHideType.MinimumDuration;
|
||||
}
|
||||
}
|
||||
@@ -1625,7 +1626,8 @@ async function sendSubmitMessage() {
|
||||
// Check to see if any of the submissions are below the minimum duration set
|
||||
if (Config.config.minDuration > 0) {
|
||||
for (let i = 0; i < sponsorTimesSubmitting.length; i++) {
|
||||
if (sponsorTimesSubmitting[i].segment[1] - sponsorTimesSubmitting[i].segment[0] < Config.config.minDuration) {
|
||||
if (sponsorTimesSubmitting[i].segment[1] - sponsorTimesSubmitting[i].segment[0] < Config.config.minDuration
|
||||
&& getCategoryActionType(sponsorTimesSubmitting[i].category) !== CategoryActionType.POI) {
|
||||
const confirmShort = chrome.i18n.getMessage("shortCheck") + "\n\n" +
|
||||
getSegmentsMessage(sponsorTimesSubmitting);
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ export class SkipButtonControlBar {
|
||||
const leftControlsContainer = document.querySelector(".ytp-left-controls");
|
||||
this.chapterText = document.querySelector(".ytp-chapter-container");
|
||||
|
||||
if (!leftControlsContainer.contains(this.container)) {
|
||||
if (leftControlsContainer && !leftControlsContainer.contains(this.container)) {
|
||||
leftControlsContainer.insertBefore(this.container, this.chapterText);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ class SkipNotice {
|
||||
}
|
||||
|
||||
setShowKeybindHint(value: boolean): void {
|
||||
this.skipNoticeRef.current.setState({
|
||||
this.skipNoticeRef?.current?.setState({
|
||||
showKeybindHint: value
|
||||
});
|
||||
}
|
||||
@@ -69,7 +69,7 @@ class SkipNotice {
|
||||
}
|
||||
|
||||
toggleSkip(): void {
|
||||
this.skipNoticeRef.current.prepAction(SkipNoticeAction.Unskip);
|
||||
this.skipNoticeRef?.current?.prepAction(SkipNoticeAction.Unskip);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user