aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorAjay <[email protected]>2023-03-18 02:05:14 -0400
committerAjay <[email protected]>2023-03-18 02:05:14 -0400
commit488f5efa2f117b13dcfb0114bf628ee480800943 (patch)
tree77abfce405326205ba571c0ab49a726082796362 /src
parente15e33b0488f31a5033f265e65ac0bac09c6da4c (diff)
downloadSponsorBlock-488f5efa2f117b13dcfb0114bf628ee480800943.tar.gz
SponsorBlock-488f5efa2f117b13dcfb0114bf628ee480800943.zip
Add option to disable thumbnail icons
Diffstat (limited to 'src')
-rw-r--r--src/config.ts2
-rw-r--r--src/content.ts1
-rw-r--r--src/utils/thumbnails.ts2
3 files changed, 4 insertions, 1 deletions
diff --git a/src/config.ts b/src/config.ts
index 66ed2bd7..6c3c98e4 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -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,
diff --git a/src/content.ts b/src/content.ts
index b5c26df6..cf1bbf8b 100644
--- a/src/content.ts
+++ b/src/content.ts
@@ -345,6 +345,7 @@ function contentConfigUpdateListener(changes: StorageChangesObject) {
setCategoryColorCSSVariables();
break;
case "fullVideoSegments":
+ case "fullVideoLabelsOnThumbnails":
updateAll();
break;
}
diff --git a/src/utils/thumbnails.ts b/src/utils/thumbnails.ts
index e78eb9c5..8b8ed266 100644
--- a/src/utils/thumbnails.ts
+++ b/src/utils/thumbnails.ts
@@ -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;
}