All Posts By:
Daniel Troise
- July 8, 2021
- June 12, 2021
- June 7, 2021
- May 14, 2021
- April 10, 2021
- January 19, 2021
- December 19, 2020
- October 29, 2020
- August 10, 2020
- July 29, 2020
- June 1, 2020
- April 7, 2020
- March 28, 2020
document.addEventListener("DOMContentLoaded", function() {
const youtubeIframes = document.querySelectorAll('iframe[src*="youtube.com"], iframe[src*="youtu.be"]');
youtubeIframes.forEach(function(iframe) {
const parent = iframe.parentElement;
if (!parent.classList.contains('youtube-container')) {
const wrapper = document.createElement('div');
wrapper.classList.add('youtube-container');
iframe.parentNode.insertBefore(wrapper, iframe);
wrapper.appendChild(iframe);
}
});
});