From 2bb653aae08a25238d924f426182523788fb2310 Mon Sep 17 00:00:00 2001 From: Toil <62353659+ilyhalight@users.noreply.github.com> Date: Fri, 30 Aug 2024 19:51:17 +0300 Subject: [PATCH] fix for some unpopular browsers --- src/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index e60faa26..6c6fe16f 100644 --- a/src/index.js +++ b/src/index.js @@ -692,9 +692,11 @@ class VideoHandler { ); this.votAutoSetVolumeSlider = ui.createSlider( html`${(this.data?.autoVolume ?? defaultAutoVolume) * 100}%${Math.round( + (this.data?.autoVolume ?? defaultAutoVolume) * 100, + )}%`, - (this.data?.autoVolume ?? defaultAutoVolume) * 100, + Math.round((this.data?.autoVolume ?? defaultAutoVolume) * 100), 0, 100, ); @@ -2435,7 +2437,7 @@ function findContainer(site, video) { : container; } - const browserVersion = browserInfo.browser.version.split(".")[0]; + const browserVersion = browserInfo.browser.version?.split(".")?.[0]; if ( site.selector?.includes(":not") && site.selector?.includes("*") &&