mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 11:37:02 +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 {
|
||||
const data = element.style[param];
|
||||
if (data?.includes("100%")) {
|
||||
return 0;
|
||||
if (data?.includes("%")) {
|
||||
return this.customChaptersBar.clientWidth * (parseFloat(data.replace("%", "")) / 100);
|
||||
} else {
|
||||
return parseInt(element.style[param].match(/\d+/g)?.[0]) || 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user