Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ok1kvk.cz
content
Commits
328b6521
Commit
328b6521
authored
Jan 11, 2020
by
Isabella Skořepová
Browse files
Fix youtube embed
parent
e2565447
Changes
1
Hide whitespace changes
Inline
Side-by-side
sitegin/image.js
View file @
328b6521
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment