Commit 328b6521 authored by Isabella Skořepová's avatar Isabella Skořepová
Browse files

Fix youtube embed

parent e2565447
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment