aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay <[email protected]>2023-05-24 19:06:38 -0400
committerAjay <[email protected]>2023-05-24 19:06:38 -0400
commit6585a4e325d89f751fcefbd167cc9f6ba46813a3 (patch)
tree2c587be9715aab85bcd1b5395b37040f42a7cd79
parent20ab0768dff4f988ab697e09695630593968b1f7 (diff)
downloadSponsorBlock-6585a4e325d89f751fcefbd167cc9f6ba46813a3.tar.gz
SponsorBlock-6585a4e325d89f751fcefbd167cc9f6ba46813a3.zip
Fix large times when locale uses dots for chapter names
Fixes #1757
-rw-r--r--src/utils/pageUtils.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/pageUtils.ts b/src/utils/pageUtils.ts
index 50ebde30..83291f1d 100644
--- a/src/utils/pageUtils.ts
+++ b/src/utils/pageUtils.ts
@@ -67,7 +67,7 @@ export function getExistingChapters(currentVideoID: VideoID, duration: number):
const timeElement = link.querySelector("#time") as HTMLElement;
const description = link.querySelector("#details h4") as HTMLElement;
if (timeElement && description?.innerText?.length > 0 && link.getAttribute("href")?.includes(currentVideoID)) {
- const time = getFormattedTimeToSeconds(timeElement.innerText.replace(".", ":"));
+ const time = getFormattedTimeToSeconds(timeElement.innerText.replace(/\./g, ":"));
if (time === null) return [];
if (lastSegment) {