mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 20:17:05 +03:00
Fix scrubbing bar missing when chapter bar using % widths
This commit is contained in:
@@ -728,8 +728,8 @@ class PreviewBar {
|
|||||||
|
|
||||||
private getPartialChapterSectionStyle(element: HTMLElement, param: string): number {
|
private getPartialChapterSectionStyle(element: HTMLElement, param: string): number {
|
||||||
const data = element.style[param];
|
const data = element.style[param];
|
||||||
if (data?.includes("100%")) {
|
if (data?.includes("%")) {
|
||||||
return 0;
|
return this.customChaptersBar.clientWidth * (parseFloat(data.replace("%", "")) / 100);
|
||||||
} else {
|
} else {
|
||||||
return parseInt(element.style[param].match(/\d+/g)?.[0]) || 0;
|
return parseInt(element.style[param].match(/\d+/g)?.[0]) || 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user