diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/inject.js b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/inject.js index ca3d7c0..1154dcb 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/inject.js +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/inject.js @@ -181,18 +181,12 @@ introSkipper.injectButton = async function () { controls.appendChild(button); } +/** Tests if the OSD controls are visible. */ introSkipper.osdVisible = function () { - let osd = document.querySelector("div.videoOsdBottom"); - - if (!osd) { - return false; - - } - - return !osd.classList.contains("hide"); + const osd = document.querySelector("div.videoOsdBottom"); + return osd ? !osd.classList.contains("hide") : false; } - /** Get the currently playing skippable segment. */ introSkipper.getCurrentSegment = function (position) { for (let key in introSkipper.skipSegments) {