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)
This commit is contained in:
NeroPcStation 2023-02-01 09:29:13 +01:00 committed by GitHub
parent 18b234a292
commit 0b62b0209e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -173,7 +173,7 @@ introSkipper.injectButton = async function () {
/** Playback position changed, check if the skip button needs to be displayed. */ /** Playback position changed, check if the skip button needs to be displayed. */
introSkipper.videoPositionChanged = function () { introSkipper.videoPositionChanged = function () {
// Ensure a skip segment was found. // Ensure a skip segment was found.
if (!introSkipper.skipSegments?.Valid) { if (!introSkipper.skipSegments || !introSkipper.skipSegments.Valid) {
return; return;
} }