Skip to content

Commit 4d215d3

Browse files
bsmthcaugner
andauthored
enhance(macros/EmbedYouTube): add optional title attribute (#10504)
Co-authored-by: Claas Augner <[email protected]>
1 parent c8f3031 commit 4d215d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: kumascript/macros/EmbedYouTube.ejs

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
//
44
// Parameters:
55
// $0 Video ID
6+
// $1 title (optional)
67
78
var video = '<iframe width="560" height="315" ' +
89
`src="https://www.youtube-nocookie.com/embed/${$0}" ` +
10+
`title="${$1 || 'YouTube video'}" ` +
911
'allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" ' +
1012
'allowfullscreen></iframe>';
11-
1213
%>
1314

1415
<%-video%>

0 commit comments

Comments
 (0)