mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 04:27:15 +03:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f9f6ac0107 | ||
|
|
133c61ffed | ||
|
|
21b7507a9e | ||
|
|
fd459414aa | ||
|
|
4296ea3f85 | ||
|
|
92b3cda9ef | ||
|
|
907eba3827 | ||
|
|
86cf324d62 | ||
|
|
e32db21f4e | ||
|
|
6afcc6fb3a |
@@ -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",
|
||||
|
||||
Submodule maze-utils updated: e3388197c3...33f0b5b757
Submodule public/_locales updated: dadf89c0eb...9469b109c2
@@ -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;
|
||||
}
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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} />
|
||||
|
||||
@@ -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: {},
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -220,7 +220,7 @@ export const PopupComponent = () => {
|
||||
}
|
||||
|
||||
{
|
||||
!Config.config.cleanPopup &&
|
||||
!Config.config.cleanPopup && !Config.config.hideSegmentCreationInPopup &&
|
||||
<SegmentSubmissionComponent
|
||||
videoID={videoID || ""}
|
||||
status={status.status}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user