1 2var is_sp, is_pad, is_pc; 3 4$(function () { 5 var user = new getUser(); 6 user.getBrows(); 7 winResize(); 8 $(window).on('resize', $.throttle ( 100, winResize)); 9 10 init(); 11 setPage(); 12 13}); 14 15 16function getUser(){ 17 this.getDevice = function(i){ 18 if(i <= 767){ 19 is_sp = true; 20 is_pad = false; 21 is_pc = false; 22 this.device = 'is_sp'; 23 $('html').addClass('is-sp').removeClass('is-pad is-pc'); 24 }else if(i <= 1023){ 25 is_pad = true; 26 is_sp = false; 27 is_pc = false; 28 this.device = 'is_pad'; 29 $('html').addClass('is-pad').removeClass('is-sp is-pc'); 30 }else{ 31 is_sp = false; 32 is_pad = false; 33 is_pc = true; 34 this.device = 'is_pc'; 35 $('html').addClass('is-pc').removeClass('is-sp is-pad'); 36 } 37 return false; 38 }, 39 this.getBrows = function(){ 40 41 var _ua = window.navigator.userAgent; 42 if (_ua.match(/MSIE/) || _ua.match(/Trident/)) { 43 this.brows = 'is_ie'; 44 $('html').addClass('is-ie'); 45 }else if (_ua.indexOf("Edge") > -1) { 46 this.brows = 'is_edge'; 47 $('html').addClass('is_edge is_ie11'); 48 }else if (_ua.indexOf("Firefox") > -1) { 49 this.brows = 'is_firefox'; 50 $('html').addClass('is-firefox'); 51 }else if (_ua.indexOf("Chrome") > -1) { 52 this.brows = 'is_chrome'; 53 $('html').addClass('is-chrome'); 54 }else if (_ua.indexOf("Opera") > -1) { 55 this.brows = 'is_opera'; 56 $('html').addClass('is-opera'); 57 }else if(_ua.indexOf("Safari") > -1) { 58 this.brows = 'is_safari'; 59 $('html').addClass('is-safari'); 60 }else { 61 this.brows = 'is_other'; 62 $('html').addClass('is-other'); 63 } 64 return false; 65 } 66}; 67 68function winResize() { 69 var $w = $(window); 70 var wH = $w.innerHeight(); 71 var wW = $w.innerWidth(); 72 var user = new getUser(); 73 user.getDevice(wW); 74 if($('.js-wh').length){ 75 $('.js-wh').css({ 76 'height': wH 77 }); 78 } 79 if($('.js-wh-slider').length){ 80 if(is_sp == true){ 81 $('.js-wh-slider').css({ 82 'height': wW*0.5625 83 }); 84 }else if(is_pad == true){ 85 $('.js-wh-slider').css({ 86 'height': wW*0.5625 87 }); 88 }else if(is_pc == true){ 89 $('.js-wh-slider').css({ 90 'height': wH*0.9 91 }); 92 } 93 94 } 95 96 97 98 if(is_sp == true){ 99 $('.js-wh-pickup').css({ 100 'height': 'auto' 101 }); 102 $('.js-wh-article').css({ 103 'height': wH*0.7 104 }); 105 }else if(is_pad == true){ 106 $('.js-wh-pickup').css({ 107 'height': 'auto' 108 }); 109 $('.js-wh-article').css({ 110 'height': wH*0.7 111 }); 112 }else if(is_pc == true){ 113 $('.js-wh-pickup').css({ 114 'height': wH 115 }); 116 $('.js-wh-article').css({ 117 'height': wH 118 }); 119 } 120} 121 122 123 124function init() { 125 var $wrapper =$('.l-wrapper'); 126 var $nav = $('.c-gnav'); 127 var $main = $('.l-main'); 128 var $state = 'is_close'; 129 var $state_2 = 'is_close'; 130 var $toggle = $('.js-gnavi-toggle'); 131 var $toggle_sp = $('.js-gnavi-toggle-sp'); 132 /*var $stagger = $('.c-gnav__item'); 133 var $stagger_2 = $('.c-gnav__item--secondary');*/ 134 var $soundflg = 'is_stop'; 135 136 $('.js-gnavi-toggle , .c-overlay--wrapper').on('click',function(){ 137 if($state == 'is_close'){ 138 no_scroll(); 139 $('html').addClass('is-gnav-open'); 140 $toggle.addClass('is-open'); 141 $toggle.removeClass('is-close'); 142 $state = 'is_open'; 143 }else{ 144 return_scroll(); 145 $('html').removeClass('is-gnav-open'); 146 $toggle.removeClass('is-open'); 147 $toggle.addClass('is-close'); 148 $('.c-gnav__item').removeClass("is-active"); 149 $('.c-gnav__secondary').removeClass("is-active"); 150 $state = 'is_close'; 151 } 152 }); 153 154 $('.js-gnavi-toggle-sp').on('click',function(){ 155 $('.l-header-login').removeClass('is-active'); 156 $('.l-header-search').removeClass('is-active'); 157 if($state == 'is_close'){ 158 no_scroll(); 159 $('html').addClass('is-gnav-open'); 160 $toggle_sp.addClass('is-open'); 161 $toggle_sp.removeClass('is-close'); 162 $state = 'is_open'; 163 }else{ 164 return_scroll(); 165 $('html').removeClass('is-gnav-open'); 166 $toggle_sp.removeClass('is-open'); 167 $toggle_sp.addClass('is-close'); 168 $('.c-gnav__item').removeClass("is-active"); 169 $('.c-gnav__secondary').removeClass("is-active"); 170 $state = 'is_close'; 171 } 172 }); 173 174 175 176 $('.c-gnav__item--primary > .c-gnav__menu').hover( 177 function(){ 178 if(is_pc == true){ 179 $('.c-gnav__item').removeClass("is-active"); 180 if($(this).hasClass('js-gnav-trigger')){ 181 $(this).parent().addClass("is-active"); 182 }else{ 183 $('.c-gnav__item').removeClass("is-active"); 184 $state_2 = 'is_close'; 185 } 186 } 187 }, 188 function(){ 189 } 190 ); 191 192 $('.js-mplayer-trigger').on('click',function(){ 193 if($soundflg == 'is_stop'){ 194 $(this).addClass("is-play"); 195 $soundflg = 'is_play'; 196 }else{ 197 $(this).removeClass("is-play"); 198 $soundflg = 'is_stop'; 199 } 200 }); 201 202 if(is_pc == true){ 203 $('.js-dd-trigger').hover( 204 function(){ 205 $(this).addClass('is-active'); 206 $('.l-header-search').removeClass('is-active'); 207 }, 208 function(){ 209 $(this).removeClass('is-active'); 210 } 211 ); 212 } 213 214 $('.js-gnav-trigger-sp').on('click', function(e) { 215 if($(this).parent().hasClass('is-active')) { 216 $(this).parent().removeClass('is-active'); 217 } else { 218 $(this).parent().addClass('is-active'); 219 } 220 }); 221 222 /* login */ 223 $('.js-login-toggle').on('click', function(e) { 224 $('.l-header-search').removeClass('is-active'); 225 if($('.l-header-login').hasClass('is-active')) { 226 $('.l-header-login').removeClass('is-active'); 227 } else { 228 $('.l-header-login').addClass('is-active'); 229 } 230 }); 231 232 /* search */ 233 $('.js-search-toggle').on('click', function(e) { 234 $('.l-header-login').removeClass('is-active'); 235 if($('.l-header-search').hasClass('is-active')) { 236 $('.l-header-search').removeClass('is-active'); 237 } else { 238 $('.l-header-search').addClass('is-active'); 239 } 240 }); 241 242 $('.js-search-form').on('submit', function(e) { 243 var keyword = $(this).find("input[name='keyword']"); 244 if (keyword.val() == "") { 245 alert("ãã¼ã¯ã¼ããå ¥åãã¦ãã ãã"); 246 keyword.focus(); 247 return false;
248 } 249 return true; 250 }); 251 hovershit(); 252} 253 254 255function setPage(){ 256 var $main =$('.l-content'); 257 initSmoothScroll(); 258 259 if($('.js-matchH').length){ 260 $('.js-matchH').matchHeight(); 261 } 262 if($('.js-parallax').length){ 263 $('.js-parallax').parallax(); 264 } 265 if($('.js-fitvids').length){ 266 $('.js-fitvids').fitVids(); 267 } 268 269 if($('.js-infinite').length){ 270 var maxpage = 500; //MAXãã¼ã¸æ° 271 $('.c-loader').css('display', 'none'); 272 $('.js-pagination').css('display', 'none'); 273 $.autopager({ 274 content: '.js-infinite',// èªã¿è¾¼ãã³ã³ãã³ã 275 link: '.js-pagination__next', // 次ãã¼ã¸ã¸ã®ãªã³ã¯ 276 start: function(current, next){ 277 $('.c-loader').css('display', 'block'); 278 }, 279 load: function(current, next){ 280// setTimeout(function () { 281 $('.c-loader').css('display', 'none'); 282// $('.js-infinite').each(function() { 283 $(this).on('inview', function(event, isInView, visiblePartX, visiblePartY) { 284 if (isInView) { 285 var nextUrl = $(this).data('url'); 286 var oldUrl = $(this).data('old_url'); 287 var needUpdateUrl = window.location.href !== nextUrl; 288 if (needUpdateUrl) { 289 window.history.pushState(null, null, nextUrl); 290 ga('send', 'pageview', window.location.pathname+window.location.search); 291 292 // ranking 293 if($('.l-content__side').length > 1){ 294 $('.l-content__side:not(:first) > .c-date').remove(); 295 $('.l-content__side:not(:first) > .c-ranking').remove(); 296 } 297 // gallery 298 if($('.js-photo-gallery', this).length){ 299 $('.js-photo-gallery', this).magnificPopup({ 300 delegate: 'a', 301 type: 'image', 302 gallery:{ 303 enabled:true 304 } 305 }); 306 } 307 // social 308 if($(".c-share__num", this).length){ 309// get_social_count(window.location.href, $(".c-share__num", this)); 310 get_social_count(oldUrl, $(".c-share__num", this)); 311 } 312 if($('.js-fitvids', this).length){ 313 $(".js-fitvids", this).fitVids(); 314 } 315 316 if($('.c-article__body', this).length){ 317 $(".c-article__body", this).fitVids(); 318 } 319 } 320 } 321 }); 322// }); 323// }, 600); 324 if( current.page >= maxpage ){ //æå¾ã®ãã¼ã¸ 325 $('.js-pagination').hide(); //次ãã¼ã¸ã®ãªã³ã¯ãé ã 326 } 327 } 328 }); 329 $('.js-pagination__next').click(function(){ // 次ãã¼ã¸ã¸ã®ãªã³ã¯ãã¿ã³ 330 $.autopager('load'); // 次ãã¼ã¸ãèªã¿è¾¼ã 331 return false; 332 }); 333 } 334 335 336 if ($main.is('.is-home')) { 337 console.log('index'); 338 initIndex(); 339 } else if ($main.is('.is-news')) { 340 console.log('news'); 341 initNews(); 342 } else if ($main.is('.is-events')) { 343 console.log('events'); 344 initEvents(); 345 } else if ($main.is('.is-venues')) { 346 console.log('venues'); 347 initVenues(); 348 } else if ($main.is('.is-articles')) { 349 console.log('articles'); 350 initArticles(); 351 } else if ($main.is('.is-music')) { 352 console.log('music'); 353 initMusic(); 354 } else if ($main.is('.is-videos')) { 355 console.log('videos'); 356 initVideos(); 357 } else if ($main.is('.is-podcasts')) { 358 console.log('podcasts'); 359 initPodcasts(); 360 } else if ($main.is('.is-artists')) { 361 console.log('artist'); 362 initArtists(); 363 }else if ($main.is('.is-mypage')) { 364 console.log('mypage'); 365 initMypage(); 366 initArtists(); 367 } else { 368 } 369 370} 371 372 373function initIndex() { 374 init_youtube(); 375 initSlider(); 376 initRanking(); 377}; 378 379function initNews() { 380 initRanking(); 381 if($('.js-photo-gallery').length){ 382 $('.js-photo-gallery').magnificPopup({ 383 delegate: 'a', 384 type: 'image', 385 gallery:{ 386 enabled:true 387 } 388 }); 389 } 390}; 391 392function initEvents() { 393 initSlider(); 394 if($('.flatpickr').length){ 395 $(".flatpickr").flatpickr( 396 { 397 disableMobile: "true" 398 } 399 ); 400 } 401 if($('.js-photo-gallery').length){ 402 $('.js-photo-gallery').magnificPopup({ 403 delegate: 'a', 404 type: 'image', 405 gallery:{ 406 enabled:true 407 } 408 }); 409 } 410}; 411 412function initArticles() { 413 initSlider(); 414 if($('.js-photo-gallery').length){ 415 $('.js-photo-gallery').magnificPopup({ 416 delegate: 'a', 417 type: 'image', 418 gallery:{ 419 enabled:true 420 } 421 }); 422 } 423}; 424 425function initMusic() { 426 initSlider(); 427}; 428 429function initPodcasts() { 430 initSlider(); 431}; 432 433function initVideos() { 434 initSlider(); 435}; 436 437function initArtists() { 438 initSlider(); 439 $('.js-profile-trigger').on('click', function (event) { 440 $('.p-artist-profile__text').addClass('is-show'); 441 $('.p-artist-profile__more').addClass('is-hide'); 442 }); 443}; 444function initVenues() { 445 initSlider(); 446}; 447function initMypage() { 448 initSlider(); 449 if($('.flatpickr').length){ 450 $(".flatpickr").flatpickr( 451 { 452 disableMobile: "true" 453 } 454 ); 455 } 456}; 457 458 459 460function setSlider(){ 461 //åºå®è¦ç´ 462 var _element = $('.js-slides'), 463 _slide = $(' > .p-index-slider__item', _element), 464 length = _slide.length; 465 //è¨å® 466 var speed = 5000, 467 //ã¹ã©ã¤ãã®é 468 transitionSpeed = 600, //animationã«è¦ããæé 469 animation = true, //èªåã¹ã©ã¤ãã®å¤æ 470 clickGuard = true; //次ã¸åã¸ã®é£ç¶ã¯ãªãã¯ãé²ã 471 472 //1æç®ã«nowã追å 473 _slide.eq(0).addClass('now'); 474 475 //次ã¸ãæ¼ããæ 476 $('#js-slide-next').on('click', function (event) { 477 clearInterval(timerId); 478 if (clickGuard) { 479 slideNext(); 480 } 481 clickGuard = false;
482 return false; 483 }); 484 485 //åã¸ãæ¼ããæ 486 $('#js-slide-prev').on('click', function (event) { 487 clearInterval(timerId); 488 if (clickGuard) { 489 slidePrev(); 490 } 491 clickGuard = false; 492 return false; 493 }); 494 495 //èªåã¹ã©ã¤ãã¹ã¿ã¼ã 496 var timerId = setInterval(function () { 497 slideNext(); 498 }, speed); 499 500 //次㸠501 function slideNext() { 502 var now = $('.js-slides .p-index-slider__item').index($('.now')), 503 nowPlus = now + 1; 504 //å ¨ã¦ã®ã¯ã©ã¹ãRESET 505 _slide.removeClass('now').removeClass('in animate').removeClass('out'); 506 507 _slide.eq(now).addClass('out'); 508 _slide.eq(nowPlus).addClass('in animate'); 509 if (now == length - 1) { 510 _slide.eq(length).addClass('out'); 511 _slide.eq(0).addClass('in animate'); 512 nowPlus = 0; 513 } 514 setTimeout(function () { 515 _slide.removeClass('in animate').removeClass('out').eq(nowPlus).addClass('now'); 516 }, transitionSpeed); 517 setTimeout(function () { 518 var count = $('.js-slides .p-index-slider__item').index($('.now')); 519 $('.pagination .currentNum').text(count + 1); 520 clickGuard = true; 521 }, 600); 522 } 523 524 //å㸠525 function slidePrev() { 526 var now = $('.js-slides .p-index-slider__item').index($('.now')), 527 nowMinus = now - 1; 528 529 //å ¨ã¦ã®ã¯ã©ã¹ãRESET 530 console.log(now); 531 console.log(nowPlus); 532 _slide.removeClass('now').removeClass('in animate').removeClass('out'); 533 534 _slide.eq(now).addClass('out'); 535 _slide.eq(nowMinus).addClass('in animate'); 536 if (now == 0) { 537 _slide.eq(length).addClass('out'); 538 _slide.eq(0).addClass('in animate'); 539 nowMinus = length - 1; 540 } 541 setTimeout(function () { 542 _slide.removeClass('in animate').removeClass('out').eq(nowMinus).addClass('now'); 543 }, transitionSpeed); 544 545 setTimeout(function () { 546 var count = $('.js-slides .p-index-slider__item').index($('.now')); 547 $('.pagination .currentNum').text(count + 1); 548 clickGuard = true; 549 }, 600); 550 } 551} 552 553function initSmoothScroll() { 554 /* smooth scroll */ 555 $(".js-scroll").click(function (event) { 556 event.preventDefault(); 557 var url = this.href; 558 var parts = url.split("#"); 559 var target = parts[1]; 560 var target_offset = $("#" + target).offset(); 561 var target_top = target_offset.top; 562 if ($(this).parent().hasClass("c-pagetop")) { 563 $('html, body').animate({ 564 scrollTop: target_top 565 }, { 566 duration: 800, 567 easing: 'easeInOutCubic' 568 }); 569 } else { 570 $('html, body').animate({ 571 scrollTop: target_top 572 }, { 573 duration: 800, 574 easing: 'easeInOutCubic' 575 }); 576 } 577 }); 578}; 579 580 581function initSlider(){ 582 var $slider = $('.js-slider'); 583 584 $('.js-slide-next').on('click', function(){ 585 $slider.slick('slickNext'); 586 }); 587 $('.js-slide-prev').on('click', function(){ 588 $slider.slick('slickPrev'); 589 }); 590 591 $slider.on('init reInit afterChange', function (event, slick, currentSlide, nextSlide) { 592 var i = (currentSlide ? currentSlide : 0) + 1; 593 $('.c-slider__currentNum').text(i); 594 $('.c-slider__totalNum').text(slick.slideCount); 595 }); 596 597 $slider.on('beforeChange', function(slick, currentSlide, nextSlide){ 598 }); 599 600 $slider.slick({ 601 arrows:false, 602 autoplay: true, 603 autoplaySpeed: 5000, 604 cssEase: 'cubic-bezier(0.645, 0.045, 0.355, 1)', 605 lazyLoad: 'progressive'//or ondemand, 606 }); 607 608 $('.js-txt-mask').each(function(index, element){ 609 var a = $(this).text().split(" "), 610 b = ""; 611 a.forEach(function(a) { 612 b += '<span class="c-mask-slide"><span class="c-mask-slide__inner">' + a + " </span></span> " 613 }), $(this).html(b) 614 }); 615} 616 617 618function initRanking(){ 619 $('.js-ranking').slick({ 620 arrows:false, 621 autoplay: false, 622 cssEase: 'cubic-bezier(0.645, 0.045, 0.355, 1)', 623 lazyLoad: 'progressive', 624 asNavFor: '.js-ranking-nav', 625 }); 626 627 $('.js-ranking-nav').slick({ 628 infinite: true, 629 slidesToShow: 3, 630 slidesToScroll: 1, 631 asNavFor: '.js-ranking', 632 focusOnSelect: true, 633 }); 634} 635 636 637 638 639function hovershit () { 640 var body = document.body, 641 timer; 642 window.addEventListener('scroll', function() { 643 clearTimeout(timer); 644 if(!body.classList.contains('u-hover-shit')) { 645 body.classList.add('u-hover-shit') 646 } 647 648 timer = setTimeout(function(){ 649 body.classList.remove('u-hover-shit') 650 },300); 651 }, false); 652}; 653 654 655 656//ãããã¼åºå® 657$(window).on('load scroll', function(){ 658 $('.header__inner').addClass('is-fixed'); 659 $('.l-sidebar').addClass('is-fixed'); 660}); 661 662 663//ã¹ã¯ãã¼ã«ç¦æ¢ç¨é¢æ° 664function no_scroll(){ 665 //PCç¨ 666 var scroll_event = 'onwheel' in document ? 'wheel' : 'onmousewheel' in document ? 'mousewheel' : 'DOMMouseScroll'; 667 $(document).on(scroll_event,function(e){e.preventDefault();}); 668 //SPç¨
669 /*$(document).on('touchmove.noScroll', function(e) {e.preventDefault();});*/ 670} 671 672//ã¹ã¯ãã¼ã«å¾©æ´»ç¨é¢æ° 673function return_scroll(){ 674 //PCç¨ 675 var scroll_event = 'onwheel' in document ? 'wheel' : 'onmousewheel' in document ? 'mousewheel' : 'DOMMouseScroll'; 676 $(document).off(scroll_event); 677 //SPç¨ 678 /*$(document).off('.noScroll');*/ 679} 680 681 682function init_youtube () { 683 var $tab = $('.js-movie-switcher-trigger'); 684 $tab.click(function() { 685 var index = $tab.index(this); 686 $tab.parent().removeClass('is-active'); 687 $(this).parent().addClass('is-active'); 688 }); 689}; 690 691var ytPlayer; 692// Player APIã®éåæãã¼ã 693var tag = document.createElement('script'); 694tag.src = "https://www.youtube.com/iframe_api"; 695var firstScriptTag = document.getElementsByTagName('script')[0]; 696firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); 697 698// Player APIã¹ã¿ã³ãã¤å®äºæã®å¦ç 699function onYouTubePlayerAPIReady() { 700 701 if($('.js-movie-switcher-trigger').length){ 702 703 var vId = $(".js-movie-switcher-trigger:first-child").attr("href").replace(/https?:\/\/[0-9a-zA-Z\.]+\//, ""); 704 ytPlayer = new YT.Player("embed_movie", { 705 width: 560, 706 height: 315, 707 videoId: vId, 708 playerVars: { 709 "rel": 0, 710 "autoplay": 0, 711 "wmode": "opaque" 712 } 713 }); 714 // åç»ãªã¹ãã¯ãªãã¯æã®å¦ç 715 $(".js-movie-switcher-trigger").on("click", function (e) { 716 e.preventDefault(); 717 var videoId = $(this).attr("href").replace(/https?:\/\/[0-9a-zA-Z\.]+\//, ""); 718 ytPlayer.loadVideoById(videoId); 719 }); 720 } 721 722 if($('.js-fitvids').length){ 723 $(".js-fitvids").fitVids(); 724 } 725 726 if($('.c-article__body').length){ 727 $(".c-article__body").fitVids(); 728 } 729 730} 731 732
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.