PageSourceSearch

https://cbcanarias.net/wp-content/themes/genesis-sample/js/youtube-video.js

js cbcanarias.net collected 2026-10-02 12:28:40 UTC 939 bytes, 27 lines download raw bytes

1document.addEventListener("DOMContentLoaded", function() {
2
3    var div, n,
4    v = document.getElementsByClassName("youtube-player");
5    for (n = 0; n < v.length; n++) {
6        div = document.createElement("div");
7        div.setAttribute("data-id", v[n].dataset.id);
8        div.innerHTML = labnolThumb(v[n].dataset.id);
9        div.onclick = labnolIframe;
10        v[n].appendChild(div);
11    }
12});
13
14function labnolThumb(id) {
15    var thumb = '<img src="https://i.ytimg.com/vi/ID/hqdefault.jpg">',
16    play = '<div class="play"></div>';
17    return thumb.replace("ID", id) + play;
18}
19
20function labnolIframe() {
21    var iframe = document.createElement("iframe");
22    var embed = "https://www.youtube.com/embed/ID?autoplay=1";
23    iframe.setAttribute("src", embed.replace("ID", this.dataset.id));
24    iframe.setAttribute("frameborder", "0");
25    iframe.setAttribute("allowfullscreen", "1");
26    this.parentNode.replaceChild(iframe, this);
27}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.