MCPcopy Create free account
hub / github.com/hackmdio/codimd / imgPlayiframe

Function imgPlayiframe

public/js/extra.js:1030–1036  ·  view source on GitHub ↗
(element, src)

Source from the content-addressed store, hash-verified

1028}
1029
1030function imgPlayiframe (element, src) {
1031 if (!$(element).attr('data-videoid')) return
1032 const iframe = $("<iframe frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>")
1033 $(iframe).attr('src', `${src + $(element).attr('data-videoid')}?autoplay=1`)
1034 $(element).find('img').css('visibility', 'hidden')
1035 $(element).append(iframe)
1036}
1037
1038const anchorForId = id => {
1039 const anchor = document.createElement('a')

Callers 1

finishViewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected