1 CUSTOM_EMBED_WARNING = 'This channel is embedding custom content from %link%.
2 Since this content is not trusted, you must click "Embed" below to allow
3 the content to be embedded.<hr>'
5 window.CustomEmbedPlayer = class CustomEmbedPlayer extends EmbedPlayer
7 if not (this instanceof CustomEmbedPlayer)
8 return new CustomEmbedPlayer(data)
13 if not data.meta.embed?
14 console.error('CustomEmbedPlayer::load(): missing meta.embed')
17 embedSrc = data.meta.embed.src
18 link = "<a href=\"#{embedSrc}\" target=\"_blank\"><strong>#{embedSrc}</strong></a>"
19 alert = makeAlert('Untrusted Content', CUSTOM_EMBED_WARNING.replace('%link%', link),
21 .removeClass('col-md-12')
22 $('<button/>').addClass('btn btn-default')
27 .appendTo(alert.find('.alert'))