Skip to content

Commit

Permalink
Merge pull request #1173 from City-of-Helsinki/UHF-X-missing-video-fix
Browse files Browse the repository at this point in the history
Added accidentally deleted video if-clause back
  • Loading branch information
annadruid authored Feb 4, 2025
2 parents 29c7151 + 6497a18 commit 3128c16
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/js/embedded-content-cookie-compliance.min.js

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

8 changes: 7 additions & 1 deletion src/js/embedded-content-cookie-compliance.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@
const containerElement = document.createElement('div');
containerElement.appendChild(iframeElement);

if (attributes.type === 'map') {
if (attributes.type === 'video') {
containerElement.classList.add('responsive-video-container');
$(`.embedded-content-cookie-compliance.media-${id}`)
.empty()
.append(containerElement)
.removeClass(`media-${id}`);
} else if (attributes.type === 'map') {
const $mapContainer = $(`.embedded-content-cookie-compliance.media-${id}`);

// Extract the map name from the wrapping component element.
Expand Down

0 comments on commit 3128c16

Please sign in to comment.