1'use strict'; 2 3(function () { 4 var YoutubeBg = { 5 instance: undefined, 6 config: { 7 wrap: '.js-yt-mv', 8 area: 'yt_iframe', 9 id: undefined 10 }, 11 state: { 12 mq: undefined, 13 init: false 14 }, 15 set: function set(id) { 16 var _this1 = this; 17 18 if (typeof YT !== 'undefined' && typeof YT.Player !== 'undefined') { 19 this.config.id = id; 20 this.instance = new YT.Player(this.config.area, { 21 videoId: this.config.id, 22 playerVars: { 23 rel: 0, 24 loop: 1, 25 playlist: this.config.id, 26 controls: 0, 27 showinfo: 0, 28 disablekb: 1, 29 playsinline: 1, 30 'html5': 1 31 } 32 }); 33 this.instance.addEventListener('onReady', function () { 34 document.querySelector(_this1.config.wrap).classList.add('is-mv-init'); 35 _this1.state.init = false; 36 37 _this1.instance.mute(); 38 39 _this1.instance.playVideo(); 40 41 _this1.scroll(); 42 43 $(window).on('scroll', function () { 44 _this1.scroll(); 45 }); 46 }); 47 } else { 48 setTimeout(function () { 49 _this1.set(id); 50 }, 200); 51 } 52 }, 53 play: function play() { 54 this.instance.playVideo(); 55 }, 56 pause: function pause() { 57 this.instance.pauseVideo(); 58 }, 59 scroll: function scroll() { 60 if (this.state.init) { 61 var area = document.querySelector(this.config.wrap); 62 var rect = area.getBoundingClientRect(); 63 64 if (rect.bottom > 0 && rect.top - $(window).innerHeight() < 0) { 65 this.play(); 66 } else { 67 this.pause(); 68 } 69 } 70 }, 71 resize: function resize() { 72 var _this2 = this; 73 74 $(window).on('resize', function () { 75 if (typeof YT !== 'undefined' && typeof YT.Player !== 'undefined') { 76 if (_this2.state.init) { 77 _this2.play(); 78 } else { 79 $(_this2.config.wrap).append('<script async src="//www.youtube.com/iframe_api"></script>'); 80 81 _this2.set($(_this2.config.wrap).attr('data-yt')); 82 } 83 } 84 }); 85 }, 86 init: function init() { 87 $(this.config.wrap).append('<script async src="//www.youtube.com/iframe_api"></script>'); 88 this.set($(this.config.wrap).attr('data-yt')); 89 this.resize(); 90 } 91 }; 92 var from = location.search; 93 var hash = location.hash; 94 95 96// if (from != '' || hash != '') { 97 98 if (hash != '') { 99 $('.l-op').hide(); 100 }else{ 101 102 103 if($(".loading_float").length){ 104 setTimeout(function(){ 105 $(".loading_float").trigger('click'); 106 },2000) 107 } 108/** 109 $('.p-onair__btn').click(function(){ 110 $(".loading_float").trigger('click'); 111 }) 112**/ 113 $(window).on('scroll',function(){ 114 let st = $(window).scrollTop(); 115 if(st > $(window).height() / 3) { 116 $('.onair_btn').addClass('is-show'); 117 }else{ 118 $('.onair_btn').removeClass('is-show'); 119 } 120 }) 121 122 } 123 124 var device; 125 var userAgent = window.navigator.userAgent.toLowerCase(); 126 127 if (userAgent.indexOf('iphone') > -1) { 128 device = 'iPhone'; 129 } else if (userAgent.indexOf('ipad') > -1 || userAgent.indexOf('macintosh') > -1 && 'ontouchend' in document) { 130 device = 'iPad'; 131 } else if (userAgent.indexOf('android') > -1) { 132 device = 'Android'; 133 } else { 134 device = 'PC'; 135 } 136 137 $(window).on('load', function () { 138 if (device == 'PC' && wW > 900) { 139 YoutubeBg.init(); 140 } 141 142 if (from == '' && hash == '') { 143 setTimeout(function () { 144 $('.p-main').addClass('is-active'); 145 }, 2000); 146 setTimeout(function () { 147 $('.c-hamburger').addClass('is-active'); 148 }, 4000); 149 } else { 150 $('.p-main').addClass('is-active'); 151 setTimeout(function () { 152 $('.c-hamburger').addClass('is-active'); 153 }, 2000); 154 } 155 }); 156 $(".bnr-slide").slick({ 157 speed: 600, 158 autoplaySpeed: 3000, 159 autoplay: true, 160 infinite: true, 161 arrows: true, 162 prevArrow: '<div class="p-bnr__arrow prev"><img src="/assets/img/news/arrow_m.png" alt="åã¸"></div>', 163 nextArrow: '<div class="p-bnr__arrow next"><img src="/assets/img/news/arrow_m_r.png" alt="次ã¸"></div>', 164 dots: false, 165 slidesToShow: 3, 166 slidesToScroll: 1, 167 responsive: [{ 168 breakpoint: 900, 169 settings: { 170 slidesToShow: 2, 171 vertical: true, 172 verticalSwiping: true 173 } 174 }] 175 }); 176})();
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.