diff --git a/manifest/firefox-manifest-extra.json b/manifest/firefox-manifest-extra.json index 3c41591674..e89e5953db 100644 --- a/manifest/firefox-manifest-extra.json +++ b/manifest/firefox-manifest-extra.json @@ -13,8 +13,5 @@ }, "browser_action": { "default_area": "navbar" - }, - "permissions": [ - "unlimitedStorage" - ] + } } diff --git a/manifest/manifest.json b/manifest/manifest.json index 3073b6e5d5..5f01711b00 100644 --- a/manifest/manifest.json +++ b/manifest/manifest.json @@ -1,7 +1,7 @@ { "name": "__MSG_fullName__", "short_name": "SponsorBlock", - "version": "5.14", + "version": "6.0", "default_locale": "en", "description": "__MSG_Description__", "homepage_url": "https://sponsor.ajay.app", @@ -16,7 +16,8 @@ }, "permissions": [ "storage", - "scripting" + "scripting", + "unlimitedStorage" ], "options_ui": { "page": "options/options.html", diff --git a/maze-utils b/maze-utils index 57038b5b54..092fdda896 160000 --- a/maze-utils +++ b/maze-utils @@ -1 +1 @@ -Subproject commit 57038b5b540150b5808b447223c8414e4d89b312 +Subproject commit 092fdda896797f9915c9a87b1287e552186aded8 diff --git a/public/_locales b/public/_locales index 0285b87951..f7d565226e 160000 --- a/public/_locales +++ b/public/_locales @@ -1 +1 @@ -Subproject commit 0285b87951827abe87cd5f7fe4032a1389b0954a +Subproject commit f7d565226ebfd457f866311a714ad8fdace8e37e diff --git a/public/popup.css b/public/popup.css index 76b03c1381..86e5729b6f 100644 --- a/public/popup.css +++ b/public/popup.css @@ -197,9 +197,7 @@ *
wrapper around each segment */ .votingButtons { - font-family: Arial, Helvetica, sans-serif; border-radius: 8px; - margin: 4px 16px; } .votingButtons[open] { padding-bottom: 5px; @@ -208,6 +206,29 @@ background-color: var(--sb-grey-bg-color); } +/* + * Nested chapters + */ +.innerChapterList { + border-radius: 8px; +} + +.innerChapterList > summary { + font-weight: bold; + padding: 4px; + cursor: pointer; +} + +.segmentWrapper:has(> .innerChapterList > summary:hover) { + background-color: var(--sb-grey-bg-color); +} + +.segmentWrapper{ + font-family: Arial, Helvetica, sans-serif; + border-radius: 8px; + margin: 4px 16px; +} + /* * Individual segments summaries (clickable ) */ @@ -293,6 +314,12 @@ padding: 10px 15px; transition: background-color 0.2s ease-in-out; } +.sbControlsMenu-item:first-child { + border-radius: 8px 0px 0px 8px; +} +.sbControlsMenu-item:last-child { + border-radius: 0px 8px 8px 0px; +} .sbControlsMenu-item:hover, .sbControlsMenu-item:focus { background-color: #444; } diff --git a/src/content.ts b/src/content.ts index f8c4c86027..92c87f2a83 100644 --- a/src/content.ts +++ b/src/content.ts @@ -147,8 +147,6 @@ let lastCheckVideoTime = -1; // To determine if a video resolution change is happening let firstPlay = true; -let channelWhitelisted = false; - let previewBar: PreviewBar = null; // Skip to highlight button let skipButtonControlBar: SkipButtonControlBar = null; @@ -245,11 +243,6 @@ function messageListener(request: Message, sender: unknown, sendResponse: (respo isYTTV: (document.location.host === "tv.youtube.com") }); - break; - case "whitelistChange": - channelWhitelisted = request.value; - sponsorsLookup(); - break; case "submitTimes": openSubmissionMenu(); @@ -402,12 +395,14 @@ function contentLocalConfigUpdateListener(changes: StorageChangesObject) { } } -if (!Config.configSyncListeners.includes(contentConfigUpdateListener)) { - Config.configSyncListeners.push(contentConfigUpdateListener); -} +if (!window.location.href.includes("youtube.com/live_chat")) { + if (!Config.configSyncListeners.includes(contentConfigUpdateListener)) { + Config.configSyncListeners.push(contentConfigUpdateListener); + } -if (!Config.configLocalListeners.includes(contentLocalConfigUpdateListener)) { - Config.configLocalListeners.push(contentLocalConfigUpdateListener); + if (!Config.configLocalListeners.includes(contentLocalConfigUpdateListener)) { + Config.configLocalListeners.push(contentLocalConfigUpdateListener); + } } function resetValues() { @@ -424,7 +419,6 @@ function resetValues() { shownSegmentFailedToFetchWarning = false; videoInfo = null; - channelWhitelisted = false; lockedCategories = []; //empty the preview bar @@ -704,7 +698,7 @@ async function startSponsorSchedule(includeIntersectingSegments = false, current logDebug(`Ready to start skipping: ${skipInfo.index} at ${currentTime}`); if (skipInfo.index === -1) return; - if (Config.config.disableSkipping || channelWhitelisted || (getChannelIDInfo().status === ChannelIDStatus.Fetching && Config.config.forceChannelCheck)){ + if (Config.config.disableSkipping || (getChannelIDInfo().status === ChannelIDStatus.Fetching && Config.config.forceChannelCheck)){ return; } diff --git a/src/js-components/previewBar.ts b/src/js-components/previewBar.ts index 793bdba24f..82a83138bc 100644 --- a/src/js-components/previewBar.ts +++ b/src/js-components/previewBar.ts @@ -132,10 +132,11 @@ class PreviewBar { // global chapter tooltip or duration tooltip // YT, Vorapis, unknown, YTTV const tooltipTextWrapper = document.querySelector(".ytp-tooltip-text-wrapper, .ytp-progress-tooltip-text-container, .yssi-slider .ys-seek-details .time-info-bar") ?? document.querySelector("#progress-bar-container.ytk-player > #hover-time-info"); + const defaultTooltipSelector = ".ytp-tooltip-title:not(.sponsorCategoryTooltip), .ytp-tooltip-title:not(.sponsorCategoryTooltip) span, .ytp-progress-tooltip-text:not(.sponsorCategoryTooltip), .current-time:not(.sponsorCategoryTooltip)"; const originalTooltip = findNonEmptyElement([ - ".ytp-tooltip-title:not(.sponsorCategoryTooltip), .ytp-progress-tooltip-text:not(.sponsorCategoryTooltip), .current-time:not(.sponsorCategoryTooltip)", + defaultTooltipSelector, ".ytp-tooltip-progress-bar-pill-title" - ]); + ]) ?? document.querySelector(defaultTooltipSelector); if (!tooltipTextWrapper || !tooltipTextWrapper.parentElement) return; // Grab the tooltip from the text wrapper as the tooltip doesn't have its classes on init diff --git a/src/messageTypes.ts b/src/messageTypes.ts index bd8df5d01c..5cb9054722 100644 --- a/src/messageTypes.ts +++ b/src/messageTypes.ts @@ -20,11 +20,6 @@ interface DefaultMessage { | "getLogs"; } -interface BoolValueMessage { - message: "whitelistChange"; - value: boolean; -} - interface IsInfoFoundMessage { message: "isInfoFound"; updating: boolean; @@ -79,7 +74,7 @@ interface SetCurrentTabSkipProfileResponse { configID: ConfigurationID | null; } -export type Message = BaseMessage & (DefaultMessage | BoolValueMessage | IsInfoFoundMessage | SkipMessage | SubmitVoteMessage | HideSegmentMessage | CopyToClipboardMessage | ImportSegmentsMessage | KeyDownMessage | LoopChapterMessage | SetCurrentTabSkipProfileResponse); +export type Message = BaseMessage & (DefaultMessage | IsInfoFoundMessage | SkipMessage | SubmitVoteMessage | HideSegmentMessage | CopyToClipboardMessage | ImportSegmentsMessage | KeyDownMessage | LoopChapterMessage | SetCurrentTabSkipProfileResponse); export interface IsInfoFoundMessageResponse { found: boolean; diff --git a/src/popup/PopupComponent.tsx b/src/popup/PopupComponent.tsx index 6475bc5ce8..891d1c71f4 100644 --- a/src/popup/PopupComponent.tsx +++ b/src/popup/PopupComponent.tsx @@ -163,10 +163,13 @@ export const PopupComponent = () => { {/* Toggle Box */}
- + { + videoID && + + }