Compare commits

..

5 Commits
3.0.2 ... 3.0.3

Author SHA1 Message Date
Ajay Ramachandran
6de1a58d88 bump version 2021-08-24 02:28:18 -04:00
Ajay Ramachandran
43a9ba0f9e Fix keybind being flaky 2021-08-23 19:51:58 -04:00
Ajay Ramachandran
c3489e54a6 Fix highlight category when minimum duration set 2021-08-23 18:23:03 -04:00
Ajay Ramachandran
75c003b204 Merge branch 'master' of https://github.com/ajayyy/SponsorBlock 2021-08-23 15:46:36 -04:00
Ajay Ramachandran
da5de43121 Fix skipping with highlight on invidious 2021-08-23 15:46:35 -04:00
4 changed files with 8 additions and 6 deletions

View File

@@ -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",

View File

@@ -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);

View File

@@ -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);
}
}

View File

@@ -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);
}
}