Update osdVisible function

This commit is contained in:
ConfusedPolarBear 2023-03-22 00:19:27 -05:00
parent b62809e656
commit 2cbe1bdb01

View File

@ -181,18 +181,12 @@ introSkipper.injectButton = async function () {
controls.appendChild(button); controls.appendChild(button);
} }
/** Tests if the OSD controls are visible. */
introSkipper.osdVisible = function () { introSkipper.osdVisible = function () {
let osd = document.querySelector("div.videoOsdBottom"); const osd = document.querySelector("div.videoOsdBottom");
return osd ? !osd.classList.contains("hide") : false;
if (!osd) {
return false;
}
return !osd.classList.contains("hide");
} }
/** Get the currently playing skippable segment. */ /** Get the currently playing skippable segment. */
introSkipper.getCurrentSegment = function (position) { introSkipper.getCurrentSegment = function (position) {
for (let key in introSkipper.skipSegments) { for (let key in introSkipper.skipSegments) {