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 { defaultPreviewTime } from "../utils/constants";
|
||||||
import { getVideo, getVideoDuration } from "../../maze-utils/src/video";
|
import { getVideo, getVideoDuration } from "../../maze-utils/src/video";
|
||||||
import { AnimationUtils } from "../../maze-utils/src/animationUtils";
|
import { AnimationUtils } from "../../maze-utils/src/animationUtils";
|
||||||
|
import { Tooltip } from "../render/Tooltip";
|
||||||
|
|
||||||
export interface SponsorTimeEditProps {
|
export interface SponsorTimeEditProps {
|
||||||
index: number;
|
index: number;
|
||||||
@@ -494,6 +495,23 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
|||||||
return;
|
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];
|
const sponsorTime = this.props.contentContainer().sponsorTimesSubmitting[this.props.index];
|
||||||
this.handleReplacingLostTimes(chosenCategory, sponsorTime.actionType, sponsorTime);
|
this.handleReplacingLostTimes(chosenCategory, sponsorTime.actionType, sponsorTime);
|
||||||
this.saveEditTimes();
|
this.saveEditTimes();
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ interface SBConfig {
|
|||||||
};
|
};
|
||||||
scrollToEditTimeUpdate: boolean;
|
scrollToEditTimeUpdate: boolean;
|
||||||
categoryPillUpdate: boolean;
|
categoryPillUpdate: boolean;
|
||||||
|
hookUpdate: boolean;
|
||||||
showChapterInfoMessage: boolean;
|
showChapterInfoMessage: boolean;
|
||||||
darkMode: boolean;
|
darkMode: boolean;
|
||||||
showCategoryGuidelines: boolean;
|
showCategoryGuidelines: boolean;
|
||||||
@@ -335,6 +336,7 @@ const syncDefaults = {
|
|||||||
skipNonMusicOnlyOnYoutubeMusic: false,
|
skipNonMusicOnlyOnYoutubeMusic: false,
|
||||||
scrollToEditTimeUpdate: false, // false means the tooltip will be shown
|
scrollToEditTimeUpdate: false, // false means the tooltip will be shown
|
||||||
categoryPillUpdate: false,
|
categoryPillUpdate: false,
|
||||||
|
hookUpdate: false,
|
||||||
showChapterInfoMessage: true,
|
showChapterInfoMessage: true,
|
||||||
darkMode: true,
|
darkMode: true,
|
||||||
showCategoryGuidelines: true,
|
showCategoryGuidelines: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user