diff options
author | Ajay <[email protected]> | 2024-01-14 14:03:05 -0500 |
---|---|---|
committer | Ajay <[email protected]> | 2024-01-14 14:03:05 -0500 |
commit | 3222afd8b419288fcfa2e7dd034fea7cfebc01e9 (patch) | |
tree | 25f97e7e769ed06518782338b56f8b130debb404 /src/utils | |
parent | eede32aa7efddbf826ba09bc45d95412733b649f (diff) | |
download | SponsorBlock-3222afd8b419288fcfa2e7dd034fea7cfebc01e9.tar.gz SponsorBlock-3222afd8b419288fcfa2e7dd034fea7cfebc01e9.zip |
Fix preview bar on mobile
Fixes #1947 and #1943
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/mobileUtils.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/utils/mobileUtils.ts b/src/utils/mobileUtils.ts new file mode 100644 index 00000000..3cff18f7 --- /dev/null +++ b/src/utils/mobileUtils.ts @@ -0,0 +1,9 @@ +export function isMobileControlsOpen(): boolean { + const overlay = document.getElementById("player-control-overlay"); + + if (overlay) { + return !!overlay?.classList?.contains("fadein"); + } + + return false; +}
\ No newline at end of file |