mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 03:57:09 +03:00
Merge branch 'master' of https://github.com/ajayyy/SponsorBlock into misc-fix
This commit is contained in:
@@ -438,7 +438,7 @@
|
|||||||
"message": "The following submission is shorter than your minimum duration option. This could mean that this is already submitted, and just being ignored due to this option. Are you sure you would like to submit?"
|
"message": "The following submission is shorter than your minimum duration option. This could mean that this is already submitted, and just being ignored due to this option. Are you sure you would like to submit?"
|
||||||
},
|
},
|
||||||
"liveOrPremiere": {
|
"liveOrPremiere": {
|
||||||
"message": "Submitting on an active livesteam or premiere is not allowed. Please wait until it finishes, then refresh the page and verify that the segments are still valid."
|
"message": "Submitting on an active livestream or premiere is not allowed. Please wait until it finishes, then refresh the page and verify that the segments are still valid."
|
||||||
},
|
},
|
||||||
"showUploadButton": {
|
"showUploadButton": {
|
||||||
"message": "Show Upload Button"
|
"message": "Show Upload Button"
|
||||||
|
|||||||
@@ -628,6 +628,7 @@ input::-webkit-inner-spin-button {
|
|||||||
font-size: 75%;
|
font-size: 75%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
inline-size: max-content;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sponsorBlockCategoryPillTitleSection {
|
.sponsorBlockCategoryPillTitleSection {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<!-- Link to specific tabs by using their ID in the URL like: options.html#keybinds -->
|
<!-- Link to specific tabs by using their ID in the URL like: options.html#keybinds -->
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>Options - SponsorBlock</title>
|
<title>__MSG_Options__ - SponsorBlock</title>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<link rel="icon" href="../icons/IconSponsorBlocker32px.png" type="image/png">
|
<link rel="icon" href="../icons/IconSponsorBlocker32px.png" type="image/png">
|
||||||
|
|||||||
@@ -725,11 +725,18 @@ async function sponsorsLookup(id: string, keepOldSubmissions = true) {
|
|||||||
// Hide all submissions smaller than the minimum duration
|
// Hide all submissions smaller than the minimum duration
|
||||||
if (Config.config.minDuration !== 0) {
|
if (Config.config.minDuration !== 0) {
|
||||||
for (const segment of sponsorTimes) {
|
for (const segment of sponsorTimes) {
|
||||||
if (segment.segment[1] - segment.segment[0] < Config.config.minDuration
|
const duration = segment[1] - segment[0];
|
||||||
&& segment.actionType !== ActionType.Poi)
|
if (duration > 0 && duration < Config.config.minDuration) {
|
||||||
segment.hidden = SponsorHideType.MinimumDuration;
|
segment.hidden = SponsorHideType.MinimumDuration;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (let i = 0; i < sponsorTimes.length; i++) {
|
||||||
|
const duration = sponsorTimes[i].segment[1] - sponsorTimes[i].segment[0] ;
|
||||||
|
if (duration > 0 && duration < Config.config.minDuration) {
|
||||||
|
sponsorTimes[i].hidden = SponsorHideType.MinimumDuration;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (keepOldSubmissions) {
|
if (keepOldSubmissions) {
|
||||||
for (const segment of oldSegments) {
|
for (const segment of oldSegments) {
|
||||||
@@ -1877,7 +1884,7 @@ function getSegmentsMessage(sponsorTimes: SponsorTime[]): string {
|
|||||||
let timeMessage = utils.getFormattedTime(sponsorTimes[i].segment[s]);
|
let timeMessage = utils.getFormattedTime(sponsorTimes[i].segment[s]);
|
||||||
//if this is an end time
|
//if this is an end time
|
||||||
if (s == 1) {
|
if (s == 1) {
|
||||||
timeMessage = " to " + timeMessage;
|
timeMessage = " " + chrome.i18n.getMessage("to") + " " + timeMessage;
|
||||||
} else if (i > 0) {
|
} else if (i > 0) {
|
||||||
//add commas if necessary
|
//add commas if necessary
|
||||||
timeMessage = ", " + timeMessage;
|
timeMessage = ", " + timeMessage;
|
||||||
|
|||||||
@@ -258,6 +258,8 @@ export default class Utils {
|
|||||||
|
|
||||||
localizeHtmlPage(): void {
|
localizeHtmlPage(): void {
|
||||||
//Localize by replacing __MSG_***__ meta tags
|
//Localize by replacing __MSG_***__ meta tags
|
||||||
|
const localizedMessage = this.getLocalizedMessage(document.title);
|
||||||
|
if (localizedMessage) document.title = localizedMessage;
|
||||||
const objects = document.getElementsByClassName("sponsorBlockPageBody")[0].children;
|
const objects = document.getElementsByClassName("sponsorBlockPageBody")[0].children;
|
||||||
for (let j = 0; j < objects.length; j++) {
|
for (let j = 0; j < objects.length; j++) {
|
||||||
const obj = objects[j];
|
const obj = objects[j];
|
||||||
|
|||||||
Reference in New Issue
Block a user