mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-25 17:08:42 +03:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f75953ad1 | ||
|
|
0f4c1c50cb | ||
|
|
9e4939e2e3 | ||
|
|
4a217300a2 | ||
|
|
f4822fa587 | ||
|
|
e4d6fdbd97 | ||
|
|
1bd72e4db1 | ||
|
|
307eadc2da | ||
|
|
99014dd113 | ||
|
|
89b7cb0230 | ||
|
|
e3da6c8643 | ||
|
|
136f5e7d61 | ||
|
|
16f24978ff |
@@ -24,7 +24,7 @@
|
|||||||
"intro": "https://wiki.sponsor.ajay.app/w/Intermission/Intro_Animation",
|
"intro": "https://wiki.sponsor.ajay.app/w/Intermission/Intro_Animation",
|
||||||
"outro": "https://wiki.sponsor.ajay.app/w/Endcards/Credits",
|
"outro": "https://wiki.sponsor.ajay.app/w/Endcards/Credits",
|
||||||
"preview": "https://wiki.sponsor.ajay.app/w/Preview/Recap",
|
"preview": "https://wiki.sponsor.ajay.app/w/Preview/Recap",
|
||||||
"filler": "https://wiki.sponsor.ajay.app/w/Filler_Tangent",
|
"filler": "https://wiki.sponsor.ajay.app/w/Tangents/Jokes",
|
||||||
"music_offtopic": "https://wiki.sponsor.ajay.app/w/Music:_Non-Music_Section",
|
"music_offtopic": "https://wiki.sponsor.ajay.app/w/Music:_Non-Music_Section",
|
||||||
"poi_highlight": "https://wiki.sponsor.ajay.app/w/Highlight",
|
"poi_highlight": "https://wiki.sponsor.ajay.app/w/Highlight",
|
||||||
"guidelines": "https://wiki.sponsor.ajay.app/w/Guidelines",
|
"guidelines": "https://wiki.sponsor.ajay.app/w/Guidelines",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "__MSG_fullName__",
|
"name": "__MSG_fullName__",
|
||||||
"short_name": "SponsorBlock",
|
"short_name": "SponsorBlock",
|
||||||
"version": "5.10.4",
|
"version": "5.11.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",
|
||||||
|
|||||||
Submodule maze-utils updated: c92044ab31...dc162b4e7d
Submodule public/_locales updated: 5ad4918d9d...1853c78fc2
@@ -88,7 +88,7 @@ div:hover > #previewbar.sbNotInvidious {
|
|||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ytp-tooltip.sponsorCategoryTooltipVisible {
|
.ytp-tooltip.sponsorCategoryTooltipVisible:not(.sponsorTooltipHasYTChapters) {
|
||||||
transform: translateY(-1em) !important;
|
transform: translateY(-1em) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -373,6 +373,7 @@ input[type='number'] {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
|
min-width: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.switch input {
|
.switch input {
|
||||||
|
|||||||
@@ -516,7 +516,7 @@ function handleMobileControlsMutations(): void {
|
|||||||
function getPreviewBarAttachElement(): HTMLElement | null {
|
function getPreviewBarAttachElement(): HTMLElement | null {
|
||||||
const progressElementOptions = [{
|
const progressElementOptions = [{
|
||||||
// For newer mobile YouTube (Sept 2024)
|
// For newer mobile YouTube (Sept 2024)
|
||||||
selector: ".ytChapteredProgressBarHost, .YtProgressBarLineHost, .YtChapteredProgressBarHost",
|
selector: ".ytChapteredProgressBarHost, .ytProgressBarLineHost, .YtProgressBarLineHost, .YtChapteredProgressBarHost",
|
||||||
isVisibleCheck: true
|
isVisibleCheck: true
|
||||||
}, {
|
}, {
|
||||||
// For newer mobile YouTube (May 2024)
|
// For newer mobile YouTube (May 2024)
|
||||||
@@ -757,7 +757,8 @@ async function startSponsorSchedule(includeIntersectingSegments = false, current
|
|||||||
skippingFunction(currentTime);
|
skippingFunction(currentTime);
|
||||||
} else {
|
} else {
|
||||||
let delayTime = timeUntilSponsor * 1000 * (1 / getVideo().playbackRate);
|
let delayTime = timeUntilSponsor * 1000 * (1 / getVideo().playbackRate);
|
||||||
if (delayTime < (isFirefoxOrSafari() && !isSafari() ? 750 : 300)) {
|
if (delayTime < (isFirefoxOrSafari() && !isSafari() ? 750 : 300)
|
||||||
|
&& shouldAutoSkip(skippingSegments[0])) {
|
||||||
let forceStartIntervalTime: number | null = null;
|
let forceStartIntervalTime: number | null = null;
|
||||||
if (isFirefoxOrSafari() && !isSafari() && delayTime > 300) {
|
if (isFirefoxOrSafari() && !isSafari() && delayTime > 300) {
|
||||||
forceStartIntervalTime = await waitForNextTimeChange();
|
forceStartIntervalTime = await waitForNextTimeChange();
|
||||||
|
|||||||
@@ -152,6 +152,10 @@ class PreviewBar {
|
|||||||
// Hide original tooltip if some chapter has been filtered out
|
// Hide original tooltip if some chapter has been filtered out
|
||||||
originalTooltip.style.display = "none";
|
originalTooltip.style.display = "none";
|
||||||
noYoutubeChapters = true;
|
noYoutubeChapters = true;
|
||||||
|
|
||||||
|
originalTooltip.classList.add("sponsorTooltipHasYTChapters");
|
||||||
|
} else {
|
||||||
|
originalTooltip.classList.remove("sponsorTooltipHasYTChapters");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mainSegment === null && secondarySegment === null) {
|
if (mainSegment === null && secondarySegment === null) {
|
||||||
@@ -163,6 +167,7 @@ class PreviewBar {
|
|||||||
this.categoryTooltipContainer.classList.add(TOOLTIP_VISIBLE_CLASS);
|
this.categoryTooltipContainer.classList.add(TOOLTIP_VISIBLE_CLASS);
|
||||||
if (mainSegment !== null && secondarySegment !== null) {
|
if (mainSegment !== null && secondarySegment !== null) {
|
||||||
this.categoryTooltipContainer.classList.add("sponsorTwoTooltips");
|
this.categoryTooltipContainer.classList.add("sponsorTwoTooltips");
|
||||||
|
originalTooltip.classList.remove("sponsorTooltipHasYTChapters");
|
||||||
} else {
|
} else {
|
||||||
this.categoryTooltipContainer.classList.remove("sponsorTwoTooltips");
|
this.categoryTooltipContainer.classList.remove("sponsorTwoTooltips");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,10 +58,27 @@ function thumbnailHoverListener(e: MouseEvent) {
|
|||||||
if (!thumbnail) return;
|
if (!thumbnail) return;
|
||||||
|
|
||||||
// Pre-fetch data for this video
|
// Pre-fetch data for this video
|
||||||
const videoID = extractVideoID(thumbnail);
|
let fetched = false;
|
||||||
if (videoID) {
|
const preFetch = () => {
|
||||||
void getSegmentsForVideo(videoID, false);
|
fetched = true;
|
||||||
}
|
const videoID = extractVideoID(thumbnail);
|
||||||
|
if (videoID) {
|
||||||
|
void getSegmentsForVideo(videoID, false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const timeout = setTimeout(preFetch, 200);
|
||||||
|
const onMouseDown = () => {
|
||||||
|
clearTimeout(timeout);
|
||||||
|
if (!fetched) {
|
||||||
|
preFetch();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
e.target.addEventListener("mousedown", onMouseDown, { once: true });
|
||||||
|
e.target.addEventListener("mouseleave", () => {
|
||||||
|
clearTimeout(timeout);
|
||||||
|
e.target.removeEventListener("mousedown", onMouseDown);
|
||||||
|
}, { once: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
function getLink(thumbnail: HTMLImageElement): HTMLAnchorElement | null {
|
function getLink(thumbnail: HTMLImageElement): HTMLAnchorElement | null {
|
||||||
|
|||||||
Reference in New Issue
Block a user