mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-14 07:27:05 +03:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
028374e62d | ||
|
|
dc1e5ce762 | ||
|
|
8fcf8ac46c | ||
|
|
ef70e71051 |
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "__MSG_fullName__",
|
"name": "__MSG_fullName__",
|
||||||
"short_name": "SponsorBlock",
|
"short_name": "SponsorBlock",
|
||||||
"version": "3.3",
|
"version": "3.3.1",
|
||||||
"default_locale": "en",
|
"default_locale": "en",
|
||||||
"description": "__MSG_Description__",
|
"description": "__MSG_Description__",
|
||||||
"homepage_url": "https://sponsor.ajay.app",
|
"homepage_url": "https://sponsor.ajay.app",
|
||||||
|
|||||||
@@ -82,13 +82,13 @@
|
|||||||
.autoHiding:not(.hidden) {
|
.autoHiding:not(.hidden) {
|
||||||
transform: translateX(0%) scale(1);
|
transform: translateX(0%) scale(1);
|
||||||
/* opacity is from YouTube page */
|
/* opacity is from YouTube page */
|
||||||
transition: transform 0.25s, width 0.25s, opacity .1s cubic-bezier(0.4,0.0,1,1) !important;
|
transition: transform 0.2s, width 0.2s, opacity .1s cubic-bezier(0.4,0.0,1,1) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.autoHiding.hidden {
|
.autoHiding.hidden {
|
||||||
transform: translateX(100%) scale(0);
|
transform: translateX(100%) scale(0);
|
||||||
/* opacity is from YouTube page */
|
/* opacity is from YouTube page */
|
||||||
transition: transform 0.25s, width 0.25s, opacity .1s cubic-bezier(0.4,0.0,1,1) !important;
|
transition: transform 0.2s, width 0.2s, opacity .1s cubic-bezier(0.4,0.0,1,1) !important;
|
||||||
|
|
||||||
width: 0px !important;
|
width: 0px !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -266,7 +266,7 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
|
|||||||
<td>
|
<td>
|
||||||
{/* Category Selector */}
|
{/* Category Selector */}
|
||||||
<select id={"sponsorTimeCategories" + this.idSuffix}
|
<select id={"sponsorTimeCategories" + this.idSuffix}
|
||||||
className="sponsorTimeCategories"
|
className="sponsorTimeCategories sponsorTimeEditSelector"
|
||||||
defaultValue={this.segments[0].category} //Just default to the first segment, as we don't know which they'll choose
|
defaultValue={this.segments[0].category} //Just default to the first segment, as we don't know which they'll choose
|
||||||
ref={this.categoryOptionRef}>
|
ref={this.categoryOptionRef}>
|
||||||
|
|
||||||
|
|||||||
@@ -386,6 +386,12 @@ function createPreviewBar(): void {
|
|||||||
function durationChangeListener(): void {
|
function durationChangeListener(): void {
|
||||||
updateAdFlag();
|
updateAdFlag();
|
||||||
updatePreviewBar();
|
updatePreviewBar();
|
||||||
|
|
||||||
|
sponsorTimes = sponsorTimes.filter(segmentDurationFilter);
|
||||||
|
}
|
||||||
|
|
||||||
|
function segmentDurationFilter(segment: SponsorTime): boolean {
|
||||||
|
return segment.videoDuration === 0 || video.duration === 0 || Math.abs(video.duration - segment.videoDuration) < 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
function cancelSponsorSchedule(): void {
|
function cancelSponsorSchedule(): void {
|
||||||
@@ -669,7 +675,7 @@ async function sponsorsLookup(id: string, keepOldSubmissions = true) {
|
|||||||
const recievedSegments: SponsorTime[] = JSON.parse(response.responseText)
|
const recievedSegments: SponsorTime[] = JSON.parse(response.responseText)
|
||||||
?.filter((video) => video.videoID === id)
|
?.filter((video) => video.videoID === id)
|
||||||
?.map((video) => video.segments)[0]
|
?.map((video) => video.segments)[0]
|
||||||
?.filter((segment) => segment.videoDuration === 0 || Math.abs(video.duration - segment.videoDuration) < 2);
|
?.filter(segmentDurationFilter);
|
||||||
if (!recievedSegments || !recievedSegments.length) {
|
if (!recievedSegments || !recievedSegments.length) {
|
||||||
// return if no video found
|
// return if no video found
|
||||||
retryFetch();
|
retryFetch();
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ export interface SponsorTime {
|
|||||||
|
|
||||||
hidden?: SponsorHideType;
|
hidden?: SponsorHideType;
|
||||||
source?: SponsorSourceType;
|
source?: SponsorSourceType;
|
||||||
|
videoDuration?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ScheduledTime extends SponsorTime {
|
export interface ScheduledTime extends SponsorTime {
|
||||||
|
|||||||
Reference in New Issue
Block a user