Add notice about hook category change

This commit is contained in:
Ajay
2025-07-25 02:13:47 -04:00
parent 44177b9ddf
commit 8c2258a331
3 changed files with 21 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ import { asyncRequestToServer } from "../utils/requests";
import { defaultPreviewTime } from "../utils/constants";
import { getVideo, getVideoDuration } from "../../maze-utils/src/video";
import { AnimationUtils } from "../../maze-utils/src/animationUtils";
import { Tooltip } from "../render/Tooltip";
export interface SponsorTimeEditProps {
index: number;
@@ -494,6 +495,23 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
return;
}
// Hook update
if (!Config.config.hookUpdate && chosenCategory === "preview") {
Config.config.hookUpdate = true;
const target = event.target.closest(".sponsorSkipNotice tbody");
if (target) {
new Tooltip({
text: chrome.i18n.getMessage("hookNewFeature"),
referenceNode: target.parentElement,
prependElement: target as HTMLElement,
bottomOffset: "30px",
opacity: 0.9,
timeout: 100
});
}
}
const sponsorTime = this.props.contentContainer().sponsorTimesSubmitting[this.props.index];
this.handleReplacingLostTimes(chosenCategory, sponsorTime.actionType, sponsorTime);
this.saveEditTimes();

View File

@@ -62,6 +62,7 @@ interface SBConfig {
};
scrollToEditTimeUpdate: boolean;
categoryPillUpdate: boolean;
hookUpdate: boolean;
showChapterInfoMessage: boolean;
darkMode: boolean;
showCategoryGuidelines: boolean;
@@ -335,6 +336,7 @@ const syncDefaults = {
skipNonMusicOnlyOnYoutubeMusic: false,
scrollToEditTimeUpdate: false, // false means the tooltip will be shown
categoryPillUpdate: false,
hookUpdate: false,
showChapterInfoMessage: true,
darkMode: true,
showCategoryGuidelines: true,