blob: c965f5153a6c1e9d5c0d039a07cbea37930b22d8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
if(!window.hasOwnProperty("frost_media")){
console.log("Registering frost_media"),
window.frost_media=!0
;var _frostMediaClick=function(t){
var e=t.target||t.srcElement
;if(e.hasAttribute("data-sigil")&&e.getAttribute("data-sigil").includes("playInlineVideo")&&(console.log("Found inline video"),
e=e.parentNode,
e.hasAttribute("data-store"))){
var i
;try{
i=JSON.parse(e.getAttribute("data-store"))
}catch(t){
return
}
i.src&&(console.log("Inline video",i.src),"undefined"!=typeof Frost&&Frost.loadVideo(i.src),
t.stopPropagation(),
t.preventDefault())
}
}
;document.addEventListener("click",_frostMediaClick,!0)
}
|