Compare commits

...

10 Commits

Author SHA1 Message Date
Ajay
f9f6ac0107 bump version 2025-07-22 20:08:34 -04:00
Ajay
133c61ffed update translations 2025-07-22 20:08:10 -04:00
Ajay
21b7507a9e Add video title as option for advanced skip settings 2025-07-22 20:07:01 -04:00
Ajay
fd459414aa Add video duration to skip rules 2025-07-22 02:08:23 -04:00
Ajay
4296ea3f85 Fix alignment of segment category names on hover 2025-07-21 04:49:08 -04:00
Ajay
92b3cda9ef Fix status of if segments were found in popup to account for disabled categories 2025-07-21 04:00:33 -04:00
Ajay
907eba3827 Fix skip to highlight button alignment on new layout 2025-07-21 03:55:40 -04:00
Ajay
86cf324d62 FIx chapter name alignment on new YouTube layout 2025-07-21 03:41:07 -04:00
Ajay
e32db21f4e Add option to hide segment creation buttons in the popup 2025-07-16 13:18:50 -04:00
Ajay
6afcc6fb3a Add link to logo author to help page 2025-07-16 02:21:05 -04:00
11 changed files with 59 additions and 17 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "__MSG_fullName__",
"short_name": "SponsorBlock",
"version": "5.13.3",
"version": "5.13.4",
"default_locale": "en",
"description": "__MSG_Description__",
"homepage_url": "https://sponsor.ajay.app",

View File

@@ -107,6 +107,10 @@ div:hover > #previewbar.sbNotInvidious {
transform: translateY(-1em) !important;
}
.ytp-tooltip.sponsorCategoryTooltipVisible {
transform: translateY(-1em) !important;
}
.ytp-tooltip.sponsorCategoryTooltipVisible.sponsorTwoTooltips {
transform: translateY(-2em) !important;
}
@@ -145,17 +149,17 @@ div:hover > #previewbar.sbNotInvidious {
}
.ytp-big-mode .ytp-tooltip.sponsorCategoryTooltipVisible.sponsorTwoTooltips > .ytp-tooltip-text-wrapper {
transform: translateY(1em) !important;
transform: translateY(1.75em) !important;
}
.ytp-big-mode .ytp-tooltip.sponsorCategoryTooltipVisible > .ytp-tooltip-text-wrapper > .ytp-tooltip-text {
display: block !important;
transform: translateY(1em) !important;
.ytp-big-mode .ytp-tooltip.sponsorCategoryTooltipVisible > .ytp-tooltip-text-wrapper .ytp-tooltip-text {
display: inline-block !important;
transform: translateY(0.75em) !important;
}
.ytp-big-mode .ytp-tooltip.sponsorCategoryTooltipVisible.sponsorTwoTooltips > .ytp-tooltip-text-wrapper > .ytp-tooltip-text {
display: block !important;
transform: translateY(2em) !important;
.ytp-big-mode .ytp-tooltip.sponsorCategoryTooltipVisible.sponsorTwoTooltips > .ytp-tooltip-text-wrapper .ytp-tooltip-text {
display: inline-block !important;
transform: translateY(0.75em) !important;
}
div:hover > .sponsorBlockChapterBar {
@@ -184,6 +188,10 @@ div:hover > .sponsorBlockChapterBar {
margin: auto;
}
.sbChapterVoteButton {
padding: 0 !important;
}
.playerButton {
vertical-align: top;
}
@@ -748,6 +756,13 @@ input::-webkit-inner-spin-button {
cursor: pointer;
display: flex;
color: white;
align-items: center;
}
/* July 2025 test UI */
.ytp-delhi-modern .skipButtonControlBarContainer {
height: 48px;
margin: auto 0;
}
.skipButtonControlBarContainer.sbhidden {
@@ -957,5 +972,5 @@ input::-webkit-inner-spin-button {
}
.sponsorblock-chapter-visible {
display: inherit !important;
display: block !important;
}

View File

@@ -122,6 +122,10 @@
as <a href="https://github.com/NDevTK">NDev</a>, <a href="https://github.com/Joe-Dowd">Joe Dowd</a>,
<a href="https://mchang.name/">Michael Chang</a> and more.
</p>
<p>
Logo by <a href="https://github.com/munadikieh">Munadi Kiehl</a>
</p>
<p>Some icons made by <a href="https://www.flaticon.com/authors/gregor-cresnar" title="Gregor Cresnar">Gregor Cresnar</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> and are licensed by <a href="https://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></p>

View File

@@ -365,7 +365,7 @@
<div class="small-description">__MSG_showTimeWithSkipsDescription__</div>
</div>
<div data-type="toggle" data-sync="cleanPopup" data-no-safari="true">
<div data-type="toggle" data-sync="cleanPopup">
<div class="switch-container">
<label class="switch">
<input id="cleanPopup" type="checkbox" checked>
@@ -375,6 +375,20 @@
__MSG_cleanPopup__
</label>
</div>
<br/>
<div data-type="toggle" data-sync="hideSegmentCreationInPopup">
<div class="switch-container">
<label class="switch">
<input id="hideSegmentCreationInPopup" type="checkbox" checked>
<span class="slider round"></span>
</label>
<label class="switch-label" for="hideSegmentCreationInPopup">
__MSG_hideSegmentCreationInPopup__
</label>
</div>
</div>
</div>
<div data-type="toggle" data-sync="darkMode">

View File

@@ -48,7 +48,7 @@ class ChapterVoteComponent extends React.Component<ChapterVoteProps, ChapterVote
draggable="false"
title={chrome.i18n.getMessage("upvoteButtonInfo")}
onClick={(e) => this.vote(e, 1)}>
<ThumbsUpSvg className="playerButtonImage"
<ThumbsUpSvg className="playerButtonImage sbChapterVoteButton"
fill={Config.config.colorPalette.white}
width={this.state.size} height={this.state.size} />
</button>
@@ -102,7 +102,7 @@ class ChapterVoteComponent extends React.Component<ChapterVoteProps, ChapterVote
}
}}>
<ThumbsDownSvg
className="playerButtonImage"
className="playerButtonImage sbChapterVoteButton"
fill={downvoteButtonColor(this.state.segment ? [this.state.segment] : null, SkipNoticeAction.Downvote, SkipNoticeAction.Downvote)}
width={this.state.size}
height={this.state.size} />

View File

@@ -77,6 +77,7 @@ interface SBConfig {
shownDeArrowPromotion: boolean;
showZoomToFillError2: boolean;
cleanPopup: boolean;
hideSegmentCreationInPopup: boolean;
// Used to cache calculated text color info
categoryPillColors: {
@@ -349,6 +350,7 @@ const syncDefaults = {
shownDeArrowPromotion: false,
showZoomToFillError2: true,
cleanPopup: false,
hideSegmentCreationInPopup: false,
categoryPillColors: {},

View File

@@ -1193,7 +1193,7 @@ async function sponsorsLookup(keepOldSubmissions = true, ignoreCache = false) {
const receivedSegments = segmentData.segments;
if (receivedSegments && receivedSegments.length) {
sponsorDataFound = true;
sponsorDataFound = receivedSegments.findIndex((segment) => getCategorySelection(segment).option !== CategorySkipOption.Disabled) !== -1;
// Check if any old submissions should be kept
if (sponsorTimes !== null && keepOldSubmissions) {

View File

@@ -220,7 +220,7 @@ export const PopupComponent = () => {
}
{
!Config.config.cleanPopup &&
!Config.config.cleanPopup && !Config.config.hideSegmentCreationInPopup &&
<SegmentSubmissionComponent
videoID={videoID || ""}
status={status.status}

View File

@@ -1,3 +1,4 @@
import { getCurrentPageTitle } from "../../maze-utils/src/elements";
import { getChannelIDInfo, getVideoDuration } from "../../maze-utils/src/video";
import Config from "../config";
import { CategorySelection, CategorySkipOption, SponsorSourceType, SponsorTime } from "../types";
@@ -19,7 +20,9 @@ export enum SkipRuleAttribute {
Description = "chapter.name",
Source = "chapter.source",
ChannelID = "channel.id",
ChannelName = "channel.name"
ChannelName = "channel.name",
VideoDuration = "video.duration",
Title = "video.title"
}
export enum SkipRuleOperator {
@@ -116,6 +119,10 @@ function getSkipRuleValue(segment: SponsorTime | VideoLabelsCacheData, rule: Adv
case SkipRuleAttribute.ChannelName:
getChannelIDInfo()
return getChannelIDInfo().author;
case SkipRuleAttribute.VideoDuration:
return getVideoDuration();
case SkipRuleAttribute.Title:
return getCurrentPageTitle() || "";
default:
return undefined;
}