blob: b83979eef694da497c2f7a152aa4b006de9585ea [file] [log] [blame]
var value="; "+document.cookie,parts=value.split("; eclipse_cookieconsent_status=");if(2==parts.length&&"allow"==parts.pop().split(";").shift())for(var videos=document.getElementsByClassName("youtube"),i=0;i<videos.length;i++){for(var youtube=videos[i],imgUrl=youtube.firstChild.firstChild.getAttribute("src");youtube.firstChild;)youtube.removeChild(youtube.firstChild);var img=document.createElement("img");img.setAttribute("src",imgUrl),img.setAttribute("class","thumb");var play=document.createElement("div");play.setAttribute("class","fa fa-5x fa-play"),youtube.appendChild(img),youtube.appendChild(play),youtube.onclick=function(){var t=document.createElement("iframe");t.setAttribute("src","https://www.youtube.com/embed/"+this.id+"?autoplay=1&autohide=1&border=0&wmode=opaque&enablejsapi=1"),t.height=this.style.height,t.width=this.style.width,this.parentNode.replaceChild(t,this)}}