mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-09-20 04:53:43 +02:00
Remove notice about highlight category update
This commit is contained in:
parent
20d0c05049
commit
06da4d6556
3 changed files with 9 additions and 27 deletions
|
@ -80,8 +80,6 @@ chrome.runtime.onInstalled.addListener(function () {
|
|||
const newUserID = utils.generateUserID();
|
||||
//save this UUID
|
||||
Config.config.userID = newUserID;
|
||||
|
||||
Config.config.highlightCategoryUpdate = true;
|
||||
}
|
||||
}, 1500);
|
||||
});
|
||||
|
|
|
@ -45,7 +45,6 @@ interface SBConfig {
|
|||
showDonationLink: boolean,
|
||||
autoHideInfoButton: boolean,
|
||||
autoSkipOnMusicVideos: boolean,
|
||||
highlightCategoryUpdate: boolean,
|
||||
colorPalette: {
|
||||
red: string,
|
||||
white: string,
|
||||
|
@ -202,12 +201,14 @@ const Config: SBObject = {
|
|||
showDonationLink: true,
|
||||
autoHideInfoButton: true,
|
||||
autoSkipOnMusicVideos: false,
|
||||
highlightCategoryUpdate: false, // TODO: Remove this once update is done
|
||||
scrollToEditTimeUpdate: false, // false means the tooltip will be shown
|
||||
|
||||
categorySelections: [{
|
||||
name: "sponsor" as Category,
|
||||
option: CategorySkipOption.AutoSkip
|
||||
}, {
|
||||
name: "poi_highlight" as Category,
|
||||
option: CategorySkipOption.ManualSkip
|
||||
}],
|
||||
|
||||
colorPalette: {
|
||||
|
@ -389,16 +390,11 @@ function fetchConfig(): Promise<void> {
|
|||
}
|
||||
|
||||
function migrateOldFormats(config: SBConfig) {
|
||||
// Should eventually move into defaults
|
||||
if (!config["highlightCategoryAdded"] && !config.categorySelections.some((s) => s.name === "poi_highlight")) {
|
||||
config["highlightCategoryAdded"] = true;
|
||||
|
||||
config.categorySelections.push({
|
||||
name: "poi_highlight" as Category,
|
||||
option: CategorySkipOption.ManualSkip
|
||||
});
|
||||
|
||||
config.categorySelections = config.categorySelections;
|
||||
if (config["highlightCategoryAdded"] !== undefined) {
|
||||
chrome.storage.sync.remove("highlightCategoryAdded");
|
||||
}
|
||||
if (config["highlightCategoryUpdate"] !== undefined) {
|
||||
chrome.storage.sync.remove("highlightCategoryUpdate");
|
||||
}
|
||||
|
||||
if (config["askAboutUnlistedVideos"]) {
|
||||
|
|
|
@ -1225,21 +1225,9 @@ function skipToTime({v, skipTime, skippingSegments, openNotice, forceAutoSkip, u
|
|||
if (!autoSkip
|
||||
&& skippingSegments.length === 1
|
||||
&& getCategoryActionType(skippingSegments[0].category) === CategoryActionType.POI) {
|
||||
skipButtonControlBar.enable(skippingSegments[0], !Config.config.highlightCategoryUpdate ? 15 : 0);
|
||||
skipButtonControlBar.enable(skippingSegments[0]);
|
||||
if (onMobileYouTube) skipButtonControlBar.setShowKeybindHint(false);
|
||||
|
||||
if (!Config.config.highlightCategoryUpdate) {
|
||||
new Tooltip({
|
||||
text: chrome.i18n.getMessage("highlightNewFeature"),
|
||||
link: "https://blog.ajay.app/highlight-sponsorblock",
|
||||
referenceNode: skipButtonControlBar.getElement().parentElement,
|
||||
prependElement: skipButtonControlBar.getElement(),
|
||||
timeout: 15
|
||||
});
|
||||
|
||||
Config.config.highlightCategoryUpdate = true;
|
||||
}
|
||||
|
||||
activeSkipKeybindElement?.setShowKeybindHint(false);
|
||||
activeSkipKeybindElement = skipButtonControlBar;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue