mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-15 07:57:09 +03:00
Merge branch 'master' of https://github.com/ajayyy/SponsorBlock into mbledkowski
This commit is contained in:
@@ -78,7 +78,7 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
|
||||
: "category_" + this.segments[0].category + "_short") || chrome.i18n.getMessage("category_" + this.segments[0].category);
|
||||
let noticeTitle = categoryName + " " + chrome.i18n.getMessage("skipped");
|
||||
if (!this.autoSkip) {
|
||||
noticeTitle = chrome.i18n.getMessage("skip") + " " + categoryName + "?";
|
||||
noticeTitle = chrome.i18n.getMessage("skip_category").replace("{0}", categoryName);
|
||||
}
|
||||
|
||||
//add notice
|
||||
@@ -540,4 +540,4 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
|
||||
}
|
||||
}
|
||||
|
||||
export default SkipNoticeComponent;
|
||||
export default SkipNoticeComponent;
|
||||
|
||||
@@ -1007,7 +1007,13 @@ function skipToTime(v: HTMLVideoElement, skipTime: number[], skippingSegments: S
|
||||
let autoSkip: boolean = utils.getCategorySelection(skippingSegments[0].category)?.option === CategorySkipOption.AutoSkip;
|
||||
|
||||
if ((autoSkip || sponsorTimesSubmitting.includes(skippingSegments[0])) && v.currentTime !== skipTime[1]) {
|
||||
v.currentTime = skipTime[1];
|
||||
// Fix for looped videos not working when skipping to the end #426
|
||||
// for some reason you also can't skip to 1 second before the end
|
||||
if (v.loop && v.duration > 1 && skipTime[1] >= v.duration - 1) {
|
||||
v.currentTime = 0;
|
||||
} else {
|
||||
v.currentTime = skipTime[1];
|
||||
}
|
||||
}
|
||||
|
||||
if (openNotice) {
|
||||
|
||||
Reference in New Issue
Block a user