Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
Merge 2ab746a into b66efa5
Browse files Browse the repository at this point in the history
  • Loading branch information
khamui committed Apr 20, 2022
2 parents b66efa5 + 2ab746a commit 96da70e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion civic_europe/assets/js/wagtail-videoembed-fix.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
document.addEventListener('DOMContentLoaded', function () {
const videoEmbeds = document.querySelectorAll('.rich-text iframe')
const iframeSelectors = [
'.rich-text iframe',
'.block-qa iframe',
'.block-col-1 iframe',
'.block-col-2 iframe',
'.block-col-3 iframe'
]

const videoEmbeds = document.querySelectorAll(iframeSelectors.join(', '))

for (const videoEmbed of videoEmbeds) {
const parentOfEmbed = videoEmbed.parentElement
Expand Down

0 comments on commit 96da70e

Please sign in to comment.