1/************************************************ 2 3@PC - common.js v5.0.0 4 5(c) ULM Co.,Ltd. - https://www.ulm-design.com 6************************************************/ 7/*-------------------------- 8global 9--------------------------*/ 10const WINDOW = $(window); 11const WRAPPER = $('#wrapper'); 12const DOCUMENT = $(document); 13var DEF_W = 1024;//ãã©ã¦ã¶ã®æ¨ªå¹ ã®æå°px 14var DEF_H = 650;//ãã©ã¦ã¶ã®ç¸¦å¹ ã®æå°px 15 16/*-------------------------- 17testã¢ã¼ã 18--------------------------*/ 19const IS_TEST = false;//TESTã¢ã¼ãã«ããå ´åã¯trueã«ã 20 21if(IS_TEST) { 22 //stats.js 23 var script2 = document.createElement('script'); 24 script2.src = 'https://cdnjs.cloudflare.com/ajax/libs/stats.js/r8/Stats.min.js'; 25 document.body.appendChild(script2); 26 script2.onload = (function(){ Common.initStats(); }); 27 28}//endif 29 30 31/******************************************************* 32 33@cookie 34 35********************************************************/ 36const COOKIE = 'namonaki.jp'; 37const COOKIE_VALUE = 'v1'; 38 39 40/******************************************************* 41 42movieè¨å® 43 44********************************************************/ 45const MOVIE_W = 853;//ããã©ã«ãã®æ¨ªå¹ 46const MOVIE_H = 480;//ããã©ã«ãã®ç¸¦å¹ 47const MOVIE_MARGIN = 50;//å·¦å³ã®ãã¼ã¸ã³ 48const MOVIE_NAVI_BTN_H = 40;//ããã®ãã¿ã³ã®é«ã 49const MOVIE_NAVI_BTN_LINE = 4;//ä½åã 50const MOVIE_NAVI_H = MOVIE_NAVI_BTN_H * MOVIE_NAVI_BTN_LINE;//ããã®é«ã(ããã©ã«ã50) 51const MOVIE_CLOSE_H = 32;//éãããã¿ã³ã®é«ã 52const MOVIE_URL = 'movie/index.html'; 53const MOVIE_ID_ARR = [ 54 { name: 'ãªã³ã©ã¤ã³åç»ï¼»åãç¡ãç®æè 編]', id: 'hMh8vIZKwUY', width: '33%', height: MOVIE_NAVI_BTN_H }, 55 { name: 'ãªã³ã©ã¤ã³åç»ï¼»æå編]', id: '1kVKfvBTY5M', width: '33%', height: MOVIE_NAVI_BTN_H }, 56 { name: 'ãªã³ã©ã¤ã³åç»ï¼»ç©¶æ¥µã®ããã£ç·¨ï¼½', id: 'brWXCneHYvQ', width: '34%', height: MOVIE_NAVI_BTN_H }, 57 { name: 'ãªã³ã©ã¤ã³åç»ï¼»ç©¶æ¥µã®æç·¨ï¼½', id: 'SOAtozSxMB8', width: '33%', height: MOVIE_NAVI_BTN_H }, 58 { name: 'ç¹çª1 æ ç»å ¬éè¨å¿µãé åå®å ¨å ¬éSPã', id: 'xfpBbr0E5Lc', width: '33%', height: MOVIE_NAVI_BTN_H }, 59 { name: 'ç¹çª2 dTVãªãªã¸ãã«ãã©ããé ä¿¡è¨å¿µç¹çªã', id: 'tnYjOdelmQ8', width: '34%', height: MOVIE_NAVI_BTN_H }, 60 // { name: 'èå°æ¨æ¶', id: 'DOYyolw6-_Q', width: '50%', height: MOVIE_NAVI_BTN_H }, 61 { name: '15ç§TVCMï¼»åæ ç·¨ï¼½', id: 'rOwCZQAZ1qQ', width: '33%', height: MOVIE_NAVI_BTN_H }, 62 { name: '15ç§TVCMï¼»ãµã¹ãã³ã¹ç·¨ï¼½', id: 'yK-gixjT4XQ', width: '33%', height: MOVIE_NAVI_BTN_H }, 63 { name: '15ç§TVCMï¼»ãã©ã編]', id: '5fIJt5DSQNo', width: '34%', height: MOVIE_NAVI_BTN_H }, 64 { name: 'äºåç·¨', id: 'TOsVU9Mlwbk', width: '33%', height: MOVIE_NAVI_BTN_H }, 65 { name: '30ç§ã«ãããã¦ã³äºå', id: 'GUZ43v5ESHY', width: '33%', height: MOVIE_NAVI_BTN_H }, 66 { name: 'ç¹å ±', id: 'febsFQfp1eA', width: '34%', height: MOVIE_NAVI_BTN_H }, 67]; 68 69/*------------------------------- 70@getMovieParams 71--------------------------------*/ 72function getMovieParams() { 73 74 var w = (WINDOW.width() - MOVIE_MARGIN) >> 0; 75 var h = MOVIE_H * (w / MOVIE_W) + MOVIE_NAVI_H + MOVIE_CLOSE_H >> 0; 76 var maxH = (WINDOW.height() - MOVIE_MARGIN) >> 0; 77 78 if( h > maxH){ 79 h = maxH;//å ¨ä½ã®é«ã 80 w = MOVIE_W * ((h - MOVIE_NAVI_H - MOVIE_CLOSE_H) / MOVIE_H) >> 0; 81 } 82 83 return { 84 'w' : w, 85 'h' : h, 86 'movieW' : MOVIE_W, 87 'movieH' : MOVIE_H, 88 'closeH' : MOVIE_CLOSE_H, 89 'url' : MOVIE_URL, 90 } 91 92}//getMovieParams 93 94 95/******************************************************* 96 97naviè¨å® 98 99********************************************************/ 100const GLOBAL_NAVI_DATA= [ 101 { id : 'news', name : 'NEWS', href : 'https://namonaki.jp/news/', target : '_blank', isSmall : false, isComing : false }, 102 { id : 'intro', name : 'INTRODUCTION', href : '../#intro', target : '_parent', isSmall : false, isComing : false }, 103 { id : 'story', name : 'STORY', href : '../#story', target : '_parent', isSmall : false, isComing : false }, 104 { id : 'cast', name : 'CAST', href : '../#cast', target : '_parent', isSmall : false, isComing : false }, 105 { id : 'staff', name : 'STAFF', href : '../#staff', target : '_parent', isSmall : false, isComing : false }, 106 { id : 'theater', name : 'THEATER', href : 'http://eigakan.org/theaterpage/schedule.php?t=namonaki', target : '_blank', isSmall : false, isComing : false }, 107 { id : 'media', name : 'MEDIA', href : 'media.php', target : '_parent', isSmall : false, isComing : false }, 108 //{ id : 'dtv', name : 'dTVãã©ã', href : 'dtv/', target : '_blank', isSmall : false, isComing : false }, 109 // { id : 'twitter', name : '<i class="icon-twitter nav-icon"></i>', href : 'https://twitter.com/namonaki2021', target : '_blank', isSmall : false, isComing : false}, 110 // { id : 'instagram', name : '<i class="icon-instagram nav-icon"></i>', href : 'http://instagram.com/namonaki2021', target : '_blank', isSmall : false, isComing : false }, 111 // { id : 'comment', name : 'COMMENT', href : '#comment', target : '_parent', isSmall : false, isComing : false }, 112 // { id : 'trailer', name : 'äºåç·¨', href : 'javascript:Main.showMovie(0);', target : '_parent', isSmall : false, isComing : false }, 113 // { id : 'about', name : 'ä½åæ å ±', href : 'about.html', target : '_parent', isSmall : false, isComing : false }, 114 // { id : 'news', name : 'ææ°æ å ±', href : './news', target : '_blank', isSmall : false, isComing : true }, 115 // { id : 'theaters', name : 'åå ´æ å ±', href : './theaters/', target : '_blank', isSmall : false, isComing : false }, 116 // { id : 'facebook', name : '<i class="icon-facebook2 nav-icon"></i>å ¬å¼Facebook', href : 'https://www.facebook.com/', target : '_blank', isSmall : false, isComing : false }, 117 //{ id : 'instagram', name : '<i class="icon-instagram nav-icon"></i>å ¬å¼Instagram', href : 'https://www.instagram.com/', target : '_blank', isSmall : false, isComing : false }, 118 //{ id : 'line', name : '<i class="icon-line nav-icon"></i>å ¬å¼LINE', href : 'https://line.me/ja/', target : '_blank', isSmall : false, isComing : false }, 119]; 120 121const GLOBAL_NAVI_IMG_PATH = 'assets/img/common/nav/'; 122 123/******************************************************* 124 125naviè¨å®(ããã¯ã¼) 126 127********************************************************/ 128const DRAWER_NAVI_DATA = GLOBAL_NAVI_DATA;/*[ 129 { id : 'about', name : 'ä½åæ å ±', href : 'about.html', target : '_parent', isSmall : false, isComing : false }, 130 { id : 'news', name : 'ææ°æ å ±', href : '../news', target : '_blank', isSmall : false, isComing : true }, 131 { id : 'theaters', name : 'åå ´æ å ±', href : '../theaters/', target : '_blank', isSmall : false, isComing : false }, 132 { id : 'twitter', name : '<i class="fab fa-twitter nav-icon"></i>å ¬å¼Twitter', href : 'https://twitter.com/', target : '_blank', isSmall : false, isComing : false}, 133 { id : 'facebook', name : '<i class="fab fa-facebook-square nav-icon"></i>å ¬å¼Facebook', href : 'https://www.facebook.com/', target : '_blank', isSmall : false, isComing : false }, 134 { id : 'instagram', name : '<i class="fab fa-instagram nav-icon"></i>å ¬å¼Instagram', href : 'https://www.instagram.com/', target : '_blank', isSmall : false, isComing : false }, 135 { id : 'line', name : '<i class="fab fa-line nav-icon"></i>å ¬å¼LINE', href : 'https://line.me/ja/', target : '_blank', isSmall : false, isComing : false }, 136 { id : 'top', name : 'ããã', href : './', target : '_parent', isSmall : false, isComing : false } 137];*/ 138 139const DRAWER_NAVI_IMG_PATH = 'assets/img/common/drawer/'; 140 141/******************************************************* 142 143snsãã¿ã³è¨å® 144 145********************************************************/ 146const SNS_URL = 'https://namonaki.jp';//ãµã¤ãURL 147 148const SNS_CUSTOM = true; 149 150const tweetTxt = '%E6%98%A0%E7%94%BB%E3%80%8C%20%23%E5%90%8D%E3%82%82%E7%84%A1%E3%81%8D%E4%B8%96%E7%95%8C%E3%81%AE%E3%82%A8%E3%83%B3%E3%83%89%E3%83%AD%E3%83%BC%E3%83%AB%20%E3%80%8D2021%E5%B9%B41%E6%9C%8829%E6%97%A5%EF%BC%88%E9%87%91%EF%BC%89%E5%85%AC%E9%96%8B';
150//ããã¹ã 151const tweetHash = 'åãç¡ã,岩ç°åå ¸,æ°ç°çå£ä½';//ããã·ã¥ã¿ã° 152 153const fbBtnType = 'button_count';// standard or box_count or button_count or button 154const fbBtnWidth = 80; 155const fbBtnSize = 'small';// small or large 156const fbAppId = '328319031707320'; 157const fbAppVer = '2.10'; 158const fbAction = 'like';// like or recommend 159const fbShowFace = false; 160const fbShare = false; 161 162const SNS_DATA =[ 163 { id: 'twitter', text: tweetTxt, hash: tweetHash },//tweetãã¿ã³ 164 { id: 'facebook-like', type: fbBtnType, size: fbBtnSize, width: fbBtnWidth, appId: fbAppId, appVer: fbAppVer, action: fbAction, showFace: fbShowFace, share: fbShare },//facebook Likeãã¿ã³ 165 { id: 'line-share' },//Line ã·ã§ã¢ãã¿ã³ 166 //{ id: 'line-like' },//Line ããããã¿ã³ 167 //{ id: 'google' , size : 'medium' , isCount:'none' },//google plusoneãã¿ã³ 168]; 169 170 171/******************************************************* 172 173bannerè¨å® 174 175********************************************************/ 176const BANNER_IMG_PATH = 'assets/img/bnr/'; 177const BANNER_DATA = [ 178 { src: 'letter.jpg', href: 'letter/', alt: 'ãéè³é ããçæ§ã¸ï¼ãã¿ãã¬ããï¼' }, 179 { src: 'buzzes.jpg', href: 'https://www.cp.buzzes.jp/movies/namonaki/', alt: 'æå¾ ææ³æç¨¿ãã£ã³ãã¼ã³' }, 180 // { src: 'dtv.jpg', href: 'dtv/', alt: 'dtvç¬å é ä¿¡' }, 181 // { src: '0.jpg', href: 'URLURL', alt: 'ããã¼1' } 182]; 183 184 185 186/************************************************************************************************************** 187 188 189Common 190 191 192***************************************************************************************************************/ 193const Common = ( function() { 194 195 /*-------------------------- 196 nav 197 --------------------------*/ 198 var _scrollPosition; 199 var _isOpenDrawer = false; 200 var drawerContainer = $('#drawer-container'); 201 202 /******************************************************* 203 204 @init 205 206 ********************************************************/ 207 function init() { 208 209 //å³ã¯ãªãã¯ç¦æ¢ 210 if($('body').hasClass('protect')){ 211 $('body').on('contextmenu',function(e){ 212 return false; 213 }); 214 } 215 216 // SNSå°çª 217 openSnsWindow(); 218 219 /*-------------------------- 220 nav 221 --------------------------*/ 222 navInit(); 223 224 }//init 225/******************************************************* 226 227 @navInit 228 229 ********************************************************/ 230 function navInit() { 231 232 $('#drawer-btn').on('click', function(){ 233 if(!_isOpenDrawer){ 234 showDrawer(); 235 }else{ 236 hideDrawer(); 237 } 238 }); 239 240 $(window).on('load', function(){ 241 //åºå®ã¡ãã¥ã¼ 242 $('#nav-trailer').on('click', function(){ 243 watchMovie(); 244 });//click 245 });//load 246 247} 248 249/******************************************************* 250 251showDrawer 252 253********************************************************/ 254function showDrawer(){ 255 256 //ã¢ãã¡ã¼ã·ã§ã³ãçµããã¾ã§touchã¤ãã³ããç¦æ¢ãã 257 $(window).on('touchmove.noScroll', function(e) { 258 e.preventDefault(); 259 }); 260 261 //naviãéããã¨ãã®ã¹ã¯ãã¼ã«éãåå¾ 262 _scrollPosition = $(window).scrollTop(); 263 264 $('.drawer-nav-btn').on('click', function(){ 265 hideDrawer(); 266 var id = $(this).attr("href"); 267 var position = $(id).offset().top; 268 $("html, body"). animate({ 269 "scrollTop": position 270 }, 500); 271 return false; 272 }); 273 274 //drawer-btnã«classããµã£ã¦ã¢ãã¡ã¼ã·ã§ã³ããã 275 $('.drawer-line').addClass('open'); 276 277 //drawerå ¨ä½ã®ã¢ãã¡ã¼ã·ã§ã³ 278 drawerContainer.css({'display':'block'}).stop().animate({'opacity': 1},600,'easeOutQuart',function() { 279 280 //touchã¤ãã³ãç¦æ¢è§£é¤ 281 $(window).off('.noScroll'); 282 283 onShowDrawer(); 284 285 }); 286 287}//showDrawer 288 289 290function onShowDrawer(){ 291 _isOpenDrawer = true; 292} 293 294 295/******************************************************* 296 297hideDrawer 298 299********************************************************/ 300function hideDrawer(){ 301 302 //ã¢ãã¡ã¼ã·ã§ã³ãçµããã¾ã§touchã¤ãã³ããç¦æ¢ãã 303 $(window).on('touchmove.noScroll', function(e) { 304 e.preventDefault(); 305 }); 306 307 //naviãéããã¨ãã®å ´æã¾ã§ã¹ã¯ãã¼ã« 308 // $(window).scrollTop(_scrollPosition); 309 310 //drawer-btnã«classããµã£ã¦ã¢ãã¡ã¼ã·ã§ã³ããã 311 $('.drawer-line').removeClass('open'); 312 313 //naviã¢ãã¡ã¼ã·ã§ã³ 314 drawerContainer.stop().animate({'opacity' : 0},600,'easeOutQuart',function(){ 315 316 $(this).css({'display':'none'}); 317 318 //touchã¤ãã³ãç¦æ¢è§£é¤ 319 $(window).off('.noScroll'); 320 321 onHideDrawer(); 322 323 }); 324 325}//hideDrawer 326 327function onHideDrawer(){ 328 329 _isOpenDrawer = false;
330 331} 332 333/***************************************** 334 335@get Is Top 336 337*****************************************/ 338function getIsTop(){ 339 340 if($('body').attr('id') == 'top'){ 341 return true; 342 }else{ 343 return false; 344 } 345 346}//getIsTop 347 348 /******************************************************* 349 350 @openSnsWindow 351 352 ********************************************************/ 353 function openSnsWindow() { 354 355 var widthHalf = window.screen.width / 2, 356 heightHalf = window.screen.height / 2, 357 blankWindowWidth = 510, // å¥çªã®æ¨ªå¹ 358 blankWindowHeight = 510, // å¥çªã®ç¸¦å¹ 359 options = { // å¾ã»ã©è¨è¼ãã window.open ã®ç¬¬ï¼å¼æ°ã§ä½¿ç¨ãã 360 left : Math.floor(widthHalf - (blankWindowWidth / 2)), // å¥çªã® Xåº§æ¨ 361 top : Math.floor(heightHalf - (blankWindowHeight / 2)), // å¥çªã® Yåº§æ¨ 362 width : blankWindowWidth, 363 height: blankWindowHeight 364 }; 365 366 $(document).on('click', '.share-link-btn', function(event) { 367 // if(window.innerWidth < 768) return; 368 event.preventDefault(); 369 var thisHref = $(this).attr('href'), 370 arg = 'left=' + options.left 371 + ',top=' + options.top 372 + ',width=' + options.width 373 + ',height=' + options.height; 374 375 window.open(thisHref, 'blankShareWindow', arg); 376 }); 377 378 } 379 380 /*--------------------------------------------- 381 PRIVATE 382 ---------------------------------------------*/ 383 function render(){ 384 window.requestAnimationFrame(render); 385 if(_stats){ _stats.update(); } 386 } 387 388 389 /*--------------------------------------------- 390 @STATS 391 ---------------------------------------------*/ 392 function initStats(){ 393 _stats = new Stats(); 394 _stats.domElement.style.position = 'fixed'; 395 _stats.domElement.style.left = '0px'; 396 _stats.domElement.style.top = '0px'; 397 document.body.appendChild(_stats.domElement); 398 399 var requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame; 400 window.requestAnimationFrame = requestAnimationFrame; 401 402 render(); 403 } 404 405 return{ 406 init:init, 407 initStats:initStats, 408 getIsTop:getIsTop 409 } 410 411 412})(); 413 414 415/******************* 416@ready 417*******************/ 418Common.init();
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.