PageSourceSearch

https://inouz.jp/times/wp-content/themes/inouztimes/js/youtube.js

js inouz.jp collected 2026-10-08 02:04:03 UTC 1,190 bytes, 34 lines download raw bytes

1(function($) {
2$(document).ready(function () {
3  // YoutubeのAPIライブラリを読み込む.
4  $.getScript('https://www.youtube.com/player_api', function () {
5    YT.ready(function () {
6      var getStateChangeEventName = function (event_id) {
7        if (event_id == YT.PlayerState.PLAYING) return '再生回数';
8      };
9
10      $('iframe').filter(function(i, element){
11        return element.src.indexOf('youtube.com/embed/') >= 0;
12      }).each(function(i, element) {
13        var player = new YT.Player(element);
14        player.addEventListener('onStateChange', function (e) {
15          var videoData = e.target['getVideoData']();
16          var actionName = getStateChangeEventName(e["data"]);
17          var labelName = videoData.video_id + " : " + videoData.title;
18          ga('send', 'event', 'movie', actionName, labelName, {
19            'nonInteraction': true
20          });
21//          dataLayer.push({
22//            'event': 'YoutubeEvent',
23//            'movie': {
24//              'action': actionName,
25//              'title': videoData.title,
26//              'video_id': videoData.video_id
27//            }
28//          });
29        });
30      });
31    });
32  });
33});
34})(jQuery);

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.