mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 21:47:06 +03:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
562adb9d55 | ||
|
|
851ceb553d | ||
|
|
4bd7e9ab34 | ||
|
|
97fc8174b9 | ||
|
|
9849c34ed3 | ||
|
|
56be762686 |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "__MSG_fullName__",
|
||||
"short_name": "SponsorBlock",
|
||||
"version": "5.1.0",
|
||||
"version": "5.1.1",
|
||||
"default_locale": "en",
|
||||
"description": "__MSG_Description__",
|
||||
"homepage_url": "https://sponsor.ajay.app",
|
||||
|
||||
@@ -392,7 +392,7 @@
|
||||
"message": "건너뛰기로 제외된 시간 표시"
|
||||
},
|
||||
"showTimeWithSkipsDescription": {
|
||||
"message": "탐색 바 아래에 있는 동영상 시간 옆 괄호에 시간이 표시돼요. 건너뛸 구간을 제외할 실제로 재생하게 될 동영상의 길이를 보여줘요. \"탐색 바에 표시\"로만 지정된 구간도 포함해요."
|
||||
"message": "이 시간은 탐색 바 아래에 있고 현재 시간 옆에 있는 대괄호로 표시돼요. 건너뛸 구간을 제외할 실제로 재생하게 될 동영상의 길이를 보여줘요. \"탐색 바에 표시\"로만 지정된 구간도 포함해요."
|
||||
},
|
||||
"youHaveSkipped": {
|
||||
"message": "건너뛴 구간: "
|
||||
@@ -424,7 +424,7 @@
|
||||
"message": "비공개 사용자 ID 가져오기/내보내기"
|
||||
},
|
||||
"whatChangeUserID": {
|
||||
"message": "이 정보를 다른 분께 공개하지 마세요. 비밀번호처럼 알려주면 위험한 정보랍니다. 다른 분이 이 정보를 가지고 나를 사칭할 수도 있어요. 공개 사용자 ID를 찾고 있다면, 팝업 내 클립보드 아이콘을 눌러주세요."
|
||||
"message": "이 정보를 다른 분께 공개하지 마세요. 이건 비밀번호와 같으며 누구와도 공유해서는 안 되는 정보랍니다. 다른 분이 이 정보를 습득한다면, 나를 사칭할 수도 있어요. 공개 사용자 ID를 찾고 있다면, 팝업 내 클립보드 아이콘을 눌러주세요."
|
||||
},
|
||||
"setUserID": {
|
||||
"message": "비공개 사용자 ID 설정"
|
||||
|
||||
@@ -67,6 +67,7 @@ interface SBConfig {
|
||||
showCategoryGuidelines: boolean;
|
||||
showCategoryWithoutPermission: boolean;
|
||||
showSegmentNameInChapterBar: boolean;
|
||||
useVirtualTime: boolean;
|
||||
|
||||
// Used to cache calculated text color info
|
||||
categoryPillColors: {
|
||||
@@ -200,6 +201,7 @@ const Config: SBObject = {
|
||||
showCategoryGuidelines: true,
|
||||
showCategoryWithoutPermission: false,
|
||||
showSegmentNameInChapterBar: true,
|
||||
useVirtualTime: true,
|
||||
|
||||
categoryPillColors: {},
|
||||
|
||||
|
||||
@@ -709,10 +709,10 @@ function startSponsorSchedule(includeIntersectingSegments = false, currentTime?:
|
||||
|
||||
function getVirtualTime(): number {
|
||||
const virtualTime = lastTimeFromWaitingEvent ?? (lastKnownVideoTime.videoTime ?
|
||||
(performance.now() - lastKnownVideoTime.preciseTime) / 1000 + lastKnownVideoTime.videoTime : null);
|
||||
(performance.now() - lastKnownVideoTime.preciseTime) * video.playbackRate / 1000 + lastKnownVideoTime.videoTime : null);
|
||||
|
||||
if ((lastTimeFromWaitingEvent || !utils.isFirefox())
|
||||
&& !isSafari() && virtualTime && Math.abs(virtualTime - video.currentTime) < 0.6 && video.currentTime !== 0) {
|
||||
if (Config.config.useVirtualTime && !isSafari() && virtualTime
|
||||
&& Math.abs(virtualTime - video.currentTime) < 0.6 && video.currentTime !== 0) {
|
||||
return virtualTime;
|
||||
} else {
|
||||
return video.currentTime;
|
||||
@@ -874,9 +874,19 @@ function setupVideoListeners() {
|
||||
}
|
||||
}
|
||||
});
|
||||
video.addEventListener('ratechange', () => startSponsorSchedule());
|
||||
video.addEventListener('ratechange', () => {
|
||||
updateVirtualTime();
|
||||
lastTimeFromWaitingEvent = null;
|
||||
|
||||
startSponsorSchedule();
|
||||
});
|
||||
// Used by videospeed extension (https://github.com/igrigorik/videospeed/pull/740)
|
||||
video.addEventListener('videoSpeed_ratechange', () => startSponsorSchedule());
|
||||
video.addEventListener('videoSpeed_ratechange', () => {
|
||||
updateVirtualTime();
|
||||
lastTimeFromWaitingEvent = null;
|
||||
|
||||
startSponsorSchedule();
|
||||
});
|
||||
const paused = () => {
|
||||
// Reset lastCheckVideoTime
|
||||
lastCheckVideoTime = -1;
|
||||
|
||||
@@ -676,7 +676,7 @@ class PreviewBar {
|
||||
for (let i = 0; i < sections.length; i++) {
|
||||
const section = sections[i] as HTMLElement;
|
||||
const checkElement = section.querySelector(selector) as HTMLElement;
|
||||
const currentSectionWidthNoMargin = this.getPartialChapterSectionStyle(section, "width") || progressBar.clientWidth;
|
||||
const currentSectionWidthNoMargin = this.getPartialChapterSectionStyle(section, "width") ?? progressBar.clientWidth;
|
||||
const currentSectionWidth = currentSectionWidthNoMargin
|
||||
+ this.getPartialChapterSectionStyle(section, "marginRight");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user