PageSourceSearch

https://dimin.com/js/eui/youtubebg.js

js dimin.com collected 2026-09-25 20:06:34 UTC 1,519 bytes, 47 lines download raw bytes

1
2var tag = document.createElement('script');
3
4tag.src = "https://www.youtube.com/iframe_api";
5var firstScriptTag = document.getElementsByTagName('script')[0];
6firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
7
8var player;
9function onYouTubeIframeAPIReady() {
10    var videoID = $("#youtube_hero").attr("data-video-id");
11    let playerSettings = { 'autoplay': 1, 'controls': 0, 'showinfo': 0, 'rel': 0, 'enablejsapi': 1, 'wmode': 'transparent', 'playsinline': 1, 'loop': 1, 'mute': 1, 'modestbranding': 1 };
12    if (window.location.pathname == '/lego-ferrari-build-race') playerSettings.vq = 'hd1080';
13    player = new YT.Player('youtube_hero', {
14        videoId: videoID,
15        playerVars: playerSettings,
16        events: {
17            'onReady': onPlayerReady,
18            'onStateChange': onPlayerStateChange
19        }
20    });
21}
22
23
24function onPlayerReady(event) {
25    window.sizeVideoIframe($('#youtube_hero').parent());
26    event.target.playVideo();
27    setInterval(function () {
28        if (player.getCurrentTime() >= player.getDuration() - 1) {
29            player.seekTo(1);
30        }
31    }, 100);
32}
33
34function onPlayerStateChange(event) {
35    //console.log('state change');
36    if (event.data == YT.PlayerState.PLAYING) {
37        //$("#youtube_hero_image").fadeOut(700);
38        //$("#youtube_hero").fadeIn(500);
39    }
40    if (event.data != YT.PlayerState.PLAYING) {
41        //player.playVideo();
42    }
43}
44
45function stopVideo() {
46    player.stopVideo();
47}

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.