diff --git a/resources/ts/fo/partials/historical-milestones.ts b/resources/ts/fo/partials/historical-milestones.ts index dba6c82d..1e711f40 100644 --- a/resources/ts/fo/partials/historical-milestones.ts +++ b/resources/ts/fo/partials/historical-milestones.ts @@ -14,7 +14,7 @@ document.addEventListener("DOMContentLoaded", function () { return; } - // Add enablejsapi=1 to YouTube iframes (inserted later by the cookie script) so they can be paused + // Enable the YouTube API on video iframes so they can be paused const storyRoot = document.querySelector("#story-historical-milestones") as HTMLElement; storyRoot.querySelectorAll("iframe").forEach(enableYoutubeApi); @@ -22,7 +22,7 @@ document.addEventListener("DOMContentLoaded", function () { new MutationObserver(mutations => { mutations.forEach(mutation => { if (mutation.target instanceof HTMLIFrameElement) { - enableYoutubeApi(mutation.target); // src changed + enableYoutubeApi(mutation.target); } mutation.addedNodes.forEach(node => { if (node instanceof HTMLIFrameElement) enableYoutubeApi(node);