Skip to content

Commit

Permalink
enhance(macros/EmbedYouTube): add optional title attribute (#10504)
Browse files Browse the repository at this point in the history
Co-authored-by: Claas Augner <495429+caugner@users.noreply.github.com>
  • Loading branch information
bsmth and caugner authored May 3, 2024
1 parent c8f3031 commit 4d215d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kumascript/macros/EmbedYouTube.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
//
// Parameters:
// $0 Video ID
// $1 title (optional)
var video = '<iframe width="560" height="315" ' +
`src="https://www.youtube-nocookie.com/embed/${$0}" ` +
`title="${$1 || 'YouTube video'}" ` +
'allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" ' +
'allowfullscreen></iframe>';
%>

<%-video%>

0 comments on commit 4d215d3

Please sign in to comment.