Add option to disable thumbnail icons

This commit is contained in:
Ajay
2023-03-18 02:05:14 -04:00
parent e15e33b048
commit 488f5efa2f
6 changed files with 27 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ interface SBConfig {
disableSkipping: boolean;
muteSegments: boolean;
fullVideoSegments: boolean;
fullVideoLabelsOnThumbnails: boolean;
manualSkipOnFullVideo: boolean;
trackViewCount: boolean;
trackViewCountInPrivate: boolean;
@@ -258,6 +259,7 @@ const syncDefaults = {
disableSkipping: false,
muteSegments: true,
fullVideoSegments: true,
fullVideoLabelsOnThumbnails: true,
manualSkipOnFullVideo: false,
trackViewCount: true,
trackViewCountInPrivate: true,

View File

@@ -345,6 +345,7 @@ function contentConfigUpdateListener(changes: StorageChangesObject) {
setCategoryColorCSSVariables();
break;
case "fullVideoSegments":
case "fullVideoLabelsOnThumbnails":
updateAll();
break;
}

View File

@@ -9,7 +9,7 @@ export async function labelThumbnails(thumbnails: HTMLImageElement[]): Promise<v
}
export async function labelThumbnail(thumbnail: HTMLImageElement): Promise<HTMLElement | null> {
if (!Config.config?.fullVideoSegments) {
if (!Config.config?.fullVideoSegments || !Config.config?.fullVideoLabelsOnThumbnails) {
hideThumbnailLabel(thumbnail);
return null;
}