'; return thumb.replace("ID", id) + play; } /*function createIframe() { var iframe = document.createElement("iframe"); iframe.setAttribute("src", "https://www.youtube.com/embed/" + this.dataset.id + "?autoplay=1"); iframe.setAttribute("frameborder", "0"); iframe.setAttribute("allowfullscreen", "1"); this.parentNode.replaceChild(iframe, this); }*/ function createAnchor(){ var anchor = document.createElement('a'); //anchor.setAttribute('href', "https://www.youtube.com/embed/" + this.dataset.id + "?autoplay=1"); //anchor.setAttribute('target', '_blank'); //this.parentNode.replaceChild(anchor, this); //anchor.click(); }