mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-11 22:17:21 +03:00
Add notice about hook category change
This commit is contained in:
Submodule public/_locales updated: 074c28fa4b...1e9eb279c9
@@ -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();
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user