Skip to content

Commit

Permalink
Merge pull request #2064 from OctopusDeploy/sf/update-accelerator-vid…
Browse files Browse the repository at this point in the history
…eo-fix

Updates accelerator.
  • Loading branch information
steve-fenton-octopus authored Nov 1, 2023
2 parents e5d675f + 077ff17 commit d295326
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
"dependencies": {
"@astrojs/mdx": "^1.0.0",
"astro": "^3.0.3",
"cspell": "^7.3.7",
"astro-accelerator": "^0.3.12",
"astro-accelerator": "^0.3.13",
"astro-accelerator-utils": "^0.3.2",
"cspell": "^7.3.7",
"hast-util-from-selector": "^3.0.0",
"remark-directive": "^2.0.1",
"remark-heading-id": "^1.0.1"
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions public/docs/js/modules/youtube.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ function enhanceYoutubeLinks() {
const videos = qsa('a[href^="https://www.youtube.com/watch?v="]');

for (var video of videos) {
if (video.parentNode.childNodes.length > 1) {
// Don't turn video into embed if it's part of a longer paragraph, for example.
continue;
}

const id = new URL(video.href).searchParams.get('v');
video.setAttribute('data-youtube', id);
video.classList.add('init');
Expand Down

0 comments on commit d295326

Please sign in to comment.