mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig.space.git
synced 2025-12-13 16:26:50 +00:00
deploy: ba0d2dabbe
This commit is contained in:
@@ -95,4 +95,16 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
link.parentNode.parentNode.classList.add('expanded')
|
||||
})
|
||||
})
|
||||
|
||||
// Video
|
||||
document.querySelectorAll('.ytEmbed').forEach(video => {
|
||||
video.addEventListener('click', e => {
|
||||
e.preventDefault()
|
||||
const lazyAttr = 'data-src'
|
||||
const iframe = e.target.querySelector(`iframe[${lazyAttr}]`)
|
||||
if (iframe) {
|
||||
const src = iframe.setAttribute('src', iframe.getAttribute(lazyAttr))
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user