Skip to content
Snippets Groups Projects
Commit 328b6521 authored by Isabella Skořepová's avatar Isabella Skořepová
Browse files

Fix youtube embed

parent e2565447
No related branches found
No related tags found
No related merge requests found
......@@ -27,10 +27,7 @@ const paramInHrefParser = href_ => {
const renderYoutube = href => {
const info = youtube.info(href)
let out = '<div class="video-container"><div class="videodiv">'
out += `${`<iframe src="https://www.youtube.com/embed/${info.videoid}` +
'?modestbranding&start='}${
info.time
}" frameborder="0" allowfullscreen></iframe>`
out += `<iframe src="https://www.youtube.com/embed/${info.videoid}?modestbranding&start='${info.time}" frameborder="0" allowfullscreen></iframe>`
out += '</div></div>'
return out
......@@ -57,8 +54,8 @@ module.exports = (href_, title, text, curFile_, cfg) => {
}
}
if (youtube.isVideo(href)) {
return renderYoutube(href, options)
if (youtube.isVideo(href_)) {
return renderYoutube(href_, options)
}
const genHTML = (file, norel) => {
const rel = file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment