mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 05:27:03 +03:00
Remove notice about highlight category update
This commit is contained in:
@@ -80,8 +80,6 @@ chrome.runtime.onInstalled.addListener(function () {
|
|||||||
const newUserID = utils.generateUserID();
|
const newUserID = utils.generateUserID();
|
||||||
//save this UUID
|
//save this UUID
|
||||||
Config.config.userID = newUserID;
|
Config.config.userID = newUserID;
|
||||||
|
|
||||||
Config.config.highlightCategoryUpdate = true;
|
|
||||||
}
|
}
|
||||||
}, 1500);
|
}, 1500);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ interface SBConfig {
|
|||||||
showDonationLink: boolean,
|
showDonationLink: boolean,
|
||||||
autoHideInfoButton: boolean,
|
autoHideInfoButton: boolean,
|
||||||
autoSkipOnMusicVideos: boolean,
|
autoSkipOnMusicVideos: boolean,
|
||||||
highlightCategoryUpdate: boolean,
|
|
||||||
colorPalette: {
|
colorPalette: {
|
||||||
red: string,
|
red: string,
|
||||||
white: string,
|
white: string,
|
||||||
@@ -202,12 +201,14 @@ const Config: SBObject = {
|
|||||||
showDonationLink: true,
|
showDonationLink: true,
|
||||||
autoHideInfoButton: true,
|
autoHideInfoButton: true,
|
||||||
autoSkipOnMusicVideos: false,
|
autoSkipOnMusicVideos: false,
|
||||||
highlightCategoryUpdate: false, // TODO: Remove this once update is done
|
|
||||||
scrollToEditTimeUpdate: false, // false means the tooltip will be shown
|
scrollToEditTimeUpdate: false, // false means the tooltip will be shown
|
||||||
|
|
||||||
categorySelections: [{
|
categorySelections: [{
|
||||||
name: "sponsor" as Category,
|
name: "sponsor" as Category,
|
||||||
option: CategorySkipOption.AutoSkip
|
option: CategorySkipOption.AutoSkip
|
||||||
|
}, {
|
||||||
|
name: "poi_highlight" as Category,
|
||||||
|
option: CategorySkipOption.ManualSkip
|
||||||
}],
|
}],
|
||||||
|
|
||||||
colorPalette: {
|
colorPalette: {
|
||||||
@@ -389,16 +390,11 @@ function fetchConfig(): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function migrateOldFormats(config: SBConfig) {
|
function migrateOldFormats(config: SBConfig) {
|
||||||
// Should eventually move into defaults
|
if (config["highlightCategoryAdded"] !== undefined) {
|
||||||
if (!config["highlightCategoryAdded"] && !config.categorySelections.some((s) => s.name === "poi_highlight")) {
|
chrome.storage.sync.remove("highlightCategoryAdded");
|
||||||
config["highlightCategoryAdded"] = true;
|
}
|
||||||
|
if (config["highlightCategoryUpdate"] !== undefined) {
|
||||||
config.categorySelections.push({
|
chrome.storage.sync.remove("highlightCategoryUpdate");
|
||||||
name: "poi_highlight" as Category,
|
|
||||||
option: CategorySkipOption.ManualSkip
|
|
||||||
});
|
|
||||||
|
|
||||||
config.categorySelections = config.categorySelections;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config["askAboutUnlistedVideos"]) {
|
if (config["askAboutUnlistedVideos"]) {
|
||||||
|
|||||||
@@ -1225,21 +1225,9 @@ function skipToTime({v, skipTime, skippingSegments, openNotice, forceAutoSkip, u
|
|||||||
if (!autoSkip
|
if (!autoSkip
|
||||||
&& skippingSegments.length === 1
|
&& skippingSegments.length === 1
|
||||||
&& getCategoryActionType(skippingSegments[0].category) === CategoryActionType.POI) {
|
&& 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 (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?.setShowKeybindHint(false);
|
||||||
activeSkipKeybindElement = skipButtonControlBar;
|
activeSkipKeybindElement = skipButtonControlBar;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user