Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifest/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "__MSG_fullName__",
"short_name": "SponsorBlock",
"version": "5.13.4",
"version": "5.14",
"default_locale": "en",
"description": "__MSG_Description__",
"homepage_url": "https://sponsor.ajay.app",
Expand Down
18 changes: 18 additions & 0 deletions src/components/SponsorTimeEditComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ interface SBConfig {
};
scrollToEditTimeUpdate: boolean;
categoryPillUpdate: boolean;
hookUpdate: boolean;
showChapterInfoMessage: boolean;
darkMode: boolean;
showCategoryGuidelines: boolean;
Expand Down Expand Up @@ -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,
Expand Down