From 0b62b0209e3819f2e5e593b29853cb932f220b43 Mon Sep 17 00:00:00 2001 From: NeroPcStation Date: Wed, 1 Feb 2023 09:29:13 +0100 Subject: [PATCH] Fix script to support older versions of chrome (#118) Fix script to work on chromium 79 and older which does not have support for optional chaining. This fixes LG WebOS 6.0 and 5.0 (issue#113) --- ConfusedPolarBear.Plugin.IntroSkipper/Configuration/inject.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/inject.js b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/inject.js index fc858a0..dfc6c6c 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/inject.js +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/inject.js @@ -173,7 +173,7 @@ introSkipper.injectButton = async function () { /** Playback position changed, check if the skip button needs to be displayed. */ introSkipper.videoPositionChanged = function () { // Ensure a skip segment was found. - if (!introSkipper.skipSegments?.Valid) { + if (!introSkipper.skipSegments || !introSkipper.skipSegments.Valid) { return; }