mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-13 06:57:09 +03:00
Load segment description from hashparams
This commit is contained in:
@@ -1,10 +1,25 @@
|
|||||||
import Config from "./config";
|
import Config from "./config";
|
||||||
import { SponsorTime, CategorySkipOption, VideoID, SponsorHideType, VideoInfo, StorageChangesObject, ChannelIDInfo, ChannelIDStatus, SponsorSourceType, SegmentUUID, Category, SkipToTimeParams, ToggleSkippable, ActionType, ScheduledTime, HashedValue } from "./types";
|
import {
|
||||||
|
ActionType,
|
||||||
import { ContentContainer, Keybind } from "./types";
|
Category,
|
||||||
|
CategorySkipOption,
|
||||||
|
ChannelIDInfo,
|
||||||
|
ChannelIDStatus,
|
||||||
|
ContentContainer,
|
||||||
|
HashedValue,
|
||||||
|
Keybind,
|
||||||
|
ScheduledTime,
|
||||||
|
SegmentUUID,
|
||||||
|
SkipToTimeParams,
|
||||||
|
SponsorHideType,
|
||||||
|
SponsorSourceType,
|
||||||
|
SponsorTime,
|
||||||
|
StorageChangesObject,
|
||||||
|
ToggleSkippable,
|
||||||
|
VideoID,
|
||||||
|
VideoInfo,
|
||||||
|
} from "./types";
|
||||||
import Utils from "./utils";
|
import Utils from "./utils";
|
||||||
const utils = new Utils();
|
|
||||||
|
|
||||||
import PreviewBar, { PreviewBarSegment } from "./js-components/previewBar";
|
import PreviewBar, { PreviewBarSegment } from "./js-components/previewBar";
|
||||||
import SkipNotice from "./render/SkipNotice";
|
import SkipNotice from "./render/SkipNotice";
|
||||||
import SkipNoticeComponent from "./components/SkipNoticeComponent";
|
import SkipNoticeComponent from "./components/SkipNoticeComponent";
|
||||||
@@ -22,6 +37,8 @@ import { importTimes } from "./utils/exporter";
|
|||||||
import { ChapterVote } from "./render/ChapterVote";
|
import { ChapterVote } from "./render/ChapterVote";
|
||||||
import { openWarningDialog } from "./utils/warnings";
|
import { openWarningDialog } from "./utils/warnings";
|
||||||
|
|
||||||
|
const utils = new Utils();
|
||||||
|
|
||||||
// Hack to get the CSS loaded on permission-based sites (Invidious)
|
// Hack to get the CSS loaded on permission-based sites (Invidious)
|
||||||
utils.wait(() => Config.config !== null, 5000, 10).then(addCSS);
|
utils.wait(() => Config.config !== null, 5000, 10).then(addCSS);
|
||||||
|
|
||||||
@@ -2343,6 +2360,7 @@ function checkForPreloadedSegment() {
|
|||||||
UUID: GenericUtils.generateUserID() as SegmentUUID,
|
UUID: GenericUtils.generateUserID() as SegmentUUID,
|
||||||
category: segment.category ? segment.category : Config.config.defaultCategory,
|
category: segment.category ? segment.category : Config.config.defaultCategory,
|
||||||
actionType: segment.actionType ? segment.actionType : ActionType.Skip,
|
actionType: segment.actionType ? segment.actionType : ActionType.Skip,
|
||||||
|
description: segment.description ?? "",
|
||||||
source: SponsorSourceType.Local
|
source: SponsorSourceType.Local
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user