1!function ($) { 2 $(function () { 3 4 var created = ''; 5 var dlFlg = false; 6 7 //analisys.jsããã¾ãã£ã¨ã³ãã¼ 8 var $window = $(window), 9 width = $window.width(), 10 height = $window.height(), 11 //DS 12 //$centerArea = $('#middle-area > div.center-area'); 13 //CS 14 $centerArea = $('#MainPanel'); 15 16 //CS 17 var $params = $('body'); 18 //DS 19 //var $params = $('#params'); 20 var siteType = ($params.data('device') == 'smart')? 'SP' : 'PC'; 21 var $sectionType = $('section.section .block-area'); 22 23 //CS 24 var $bg = $('body'); 25 //DS 26 //var $bg = $bg; 27 28 var pageId = $params.data('page-id'); 29 //DS 30 // if ($sectionType.length) { 31 // pageId = $bg.data('page-id'); 32 // }elseãif($('#GlForm').length){ 33 // pageId = $('body').data('page-id'); 34 // } 35 var $section = $bg.find('section.section'); 36 37 var moviePlayFlg = false; 38 var moveAutoPauseFlg = false; 39 40 var YTPlayFlg = false; 41 var YTAutoPauseFlg = false; 42 43 //$.cookie.json = true; 44 //$.cookie.raw = true; 45 46 47 //äºééä¿¡é²æ¢ 48 var sendFlg = false; 49 50 //äºéã¯ãªãã¯é²æ¢ 51 //var clickFlg = false; 52 53 //CSç¬èªããã©ã¼ã ã®ã¹ããã 54 var cs_form_step = ''; 55 56 var uniquePageId = public_uuid + $.now(); 57 var ua = window.navigator.userAgent; 58 var winSize = width + ',' + height; 59 var scroll_y = $window.scrollTop(); 60 var scroll_x = $window.scrollLeft(); 61 62 var another_tab_flg = false; 63 64 //var UserActionObject = {}; 65 66 67 //ã¯ãªãã¯ãã°åå¾ 68 //$(document).on('click tap',function(e){ 69 //IE,firefoxã§ãããªã³ã°ããã¾ãè¡ãããè¦ç´ ã«å¯¾ããã¯ãªãã¯ã¤ãã³ããçºç«ããªããããè¦ç´ èªä½ã«ã¤ãã³ãã¤ãã 70 //divã«é¢ãã¦ã¯firstEventAddã§ 71 // $('a,button,input').on('click',function(e){ 72 // // 73 // //onclick屿§ãã¤ãã¦ããå ´åã¯ããã§ã«ã¤ãã³ããå²ãè¾¼ã¾ãã¦ããã®ã§(firstEventAdd)ã¯ãªãã¯ã¤ãã³ãã§ã¯çºåãããªã 74 // if($(this).attr('onclick') == undefined){ 75 // $.getClick(e); 76 // } 77 // }); 78 //åçã«è¿½å ãããã®ã«ã¤ãã³ããã¤ããããªãå ´åããããã 79 $(document).on('click tap','a,button,input', function(e) { 80 //onclick屿§ãã¤ãã¦ããå ´åã¯ããã§ã«ã¤ãã³ããå²ãè¾¼ã¾ãã¦ããã®ã§(firstEventAdd)ã¯ãªãã¯ã¤ãã³ãã§ã¯çºåãããªã 81 if($(this).attr('onclick') == undefined){ 82 $.getClick(e); 83 } 84 }); 85 86 $("video").on({ 87 "play":function(e){ 88 89 var $_this = $(this); 90 91 var id1 = $_this.parents('.block').data('block-id'); 92 var id2 = $_this.parents('.record').data('record-id'); 93 94 var attrs = $(this).get(0).attributes; 95 var attrsStr = '<video '; 96 97 for (var i = 0; i < attrs.length; i++) { 98 attrsStr += attrs[i]['name']; 99 if(attrs[i]['value'] != ''){ 100 attrsStr += "='" + attrs[i]['value'] + "'"; 101 } 102 attrsStr += " "; 103 } 104 105 attrsStr += '>'; 106 107 if($(this).attr('autoplay') == undefined || moviePlayFlg){ 108 var data = { 109 'event' :'play', 110 'page_id' :pageId, 111 'id1' :id1, 112 'id2' :id2, 113 'element' :attrsStr, 114 }; 115 $.insertUAObj('video',data); 116 } 117 moviePlayFlg = true; 118 }, 119 "ended":function(e){
120 moveAutoPauseFlg = true; 121 }, 122 "pause":function(e){ 123 124 var $_this = $(this); 125 126 var id1 = $_this.parents('.block').data('block-id'); 127 var id2 = $_this.parents('.record').data('record-id'); 128 129 var attrs = $(this).get(0).attributes; 130 var attrsStr = '<video '; 131 132 for (var i = 0; i < attrs.length; i++) { 133 attrsStr += attrs[i]['name']; 134 if(attrs[i]['value'] != ''){ 135 attrsStr += "='" + attrs[i]['value'] + "'"; 136 } 137 attrsStr += " "; 138 } 139 140 attrsStr += '>'; 141 142 setTimeout(function(){ 143 var media_id = 0; 144 if(!moveAutoPauseFlg){ 145 var data = { 146 'event' :'pause', 147 'page_id' :pageId, 148 'id1' :id1, 149 'id2' :id2, 150 'element' :attrsStr, 151 }; 152 153 $.insertUAObj('video',data); 154 } 155 moveAutoPauseFlg = false; 156 }, 100); 157 }, 158 }); 159 160 161 $('form').on('submit',function(e){ 162 163 //äºééä¿¡é²æ¢ 164 if(!sendFlg){ 165 166 var $_thisForm = $(this); 167 168 //éå ¬éã¦ã¼ã¶ã¼ãã°ã¤ã³ 169 //DS 170 //if($_thisForm.attr('id') == 'CloseUserIndexForm'){ 171 //CS 172 if($_thisForm.attr('id').match(/\?login\=trueForm/)){ 173 //DS 174 //var data = {'close_user_name':$('#inp-username').val()}; 175 //CS 176 var data = {'close_user_name':$('.username').val()}; 177 $.insertUAObj('close_user_login',data); 178 //æ¤ç´¢ãã°åå¾ 179 //DS 180 // }else if($_thisForm.attr('id') == 'searchIndexForm'){ 181 // var data = {'search_cond':$('#inp-search_word').val()}; 182 // $.insertUAObj('search',data); 183 //ä¸åç£ï¼å°å³å«ãï¼ãèªåè»æ¤ç´¢ 184 //DS 185 //}else if($_thisForm.hasClass('automobile-form') || $_thisForm.hasClass('estate-form') || $_thisForm.hasClass('gmap-box')){ 186 //CS 187 }else if($_thisForm.parents('.type107').length || $_thisForm.parents('.type108').length){ 188 189 var search_serialize = $_thisForm.serializeArray(); 190 var search_cond = {}; 191 192 for(var item in search_serialize){ 193 194 var name = search_serialize[item]['name']; 195 var val = search_serialize[item]['value']; 196 197 search_cond[name] = val; 198 } 199 200 var id1 = $_thisForm.parents('.block').data('block-id'); 201 var id2 = $_thisForm.parents('.record').data('record-id'); 202 203 var data = { 204 'page_id' :pageId, 205 'id1' :id1, 206 'id2' :id2, 207 'search_cond':search_cond 208 }; 209 $.insertUAObj('record_search',data); 210 //ãåãåãã(å ¥åãã©ã¼ã ) 211 //DS 212 //}else if($_thisForm.hasClass('type019-form')){ 213 }else if($_thisForm.parents('.type022').length){ 214 var fid = $('#FID').val(); 215 var contact_serialize = $_thisForm.serializeArray(); 216 var contact_form = {}; 217 var item_list = {}; 218 219 for(var item in contact_serialize){ 220 221 var name = contact_serialize[item]['name']; 222 var val = contact_serialize[item]['value']; 223 224 var item_name = $("[name='"+name+"']").closest('tr').find('.th2').text(); 225 if(item_name != ''){ 226 item_list[item_name] = val; 227 } 228
229 contact_form[name] = val; 230 } 231 232 var step = 'confirm'; 233 if(cs_form_step != ''){ 234 step = cs_form_step; 235 } 236 237 var data = { 238 'page_id' :pageId, 239 'id1' :id1, 240 'id2' :id2, 241 'step' :step, 242 'fid' :fid, 243 'item_list' :item_list, 244 'contact_form':contact_form 245 }; 246 $.insertUAObj('contact',data); 247 } 248 249 250 251 //e.preventDefault(); 252 $.sendDataCheck($_thisForm); 253 } 254 255 }); 256 257 //ãã¼ã¸ãé¢ããã¨ãã«submit 258 $window.on('beforeunload pagehide unload',function(){ 259 $.sendDataCheck(); 260 }); 261 262 // $('.media-load-iframe').on('load',function(){ 263 // //console.log('load'); 264 // //console.log($(this)); 265 // $(this).contents().find("body").on("click", function(e){ 266 // //console.log('body'); 267 // }); 268 // }); 269 270 $.extend({ 271 getClick:function(e,flg){ 272 273 //çºç«å åå¾ 274 if(flg){ 275 var $_this = e; 276 }else{ 277 var $current = $(e.currentTarget); 278 if($current.context !== undefined && $current.context.activeElement !== undefined){ 279 var $_this = $($current.context.activeElement); 280 }else{ 281 var $_this = $current; 282 } 283 284 } 285 286 var contents = 'common'; 287 var id1 = 0; 288 var id2 = 0; 289 var position = $.getPosition(e); 290 291 if($_this.attr('href') !== undefined){ 292 var myHref = $_this.attr('href'); 293 }else{ 294 var myHref = ''; 295 } 296 297 if( $_this.prop("tagName") != undefined){ 298 //ã¿ã° 299 var tagName = $_this.prop("tagName").toLowerCase(); 300 301 //bodyã®ä¸ã§ä½çªç®ã®è¦ç´ ãï¼indexï¼ããå§ã¾ãï¼ 302 var index = $('body ' + tagName).index($_this); 303 304 //bodyã®ã¯ãªãã¯ã¤ãã³ããªã©ã¯éããªã 305 if(index >= 0){ 306 //eqãï¼ããå§ã¾ã 307 var selector = 'body '+tagName +':eq(' +index+ ')'; 308 309 //atributesã®åå¾ 310 var attrs = $(selector).get(0).attributes; 311 var attrsStr = '<'+tagName+' '; 312 313 for (var i = 0; i < attrs.length; i++) { 314 //attrsStr[attrs[i]['name']] = attrs[i]['value']; 315 attrsStr += attrs[i]['name'] + "='" + attrs[i]['value'] + "' "; 316 } 317 318 attrsStr += '>'; 319 320 //ã¬ã³ã¼ã 321 //DS 322 //if($_this.parents('.record').length){ 323 //CS 324 if($_this.parents('#ContentsArea').length){ 325 326 contents = 'record'; 327 328 id1 = $_this.parents('.block').data('block-id'); 329 id2 = $_this.parents('.record').data('record-id'); 330 331 //ãã¡ã¤ã«ãã¦ã³ãã¼ã 332 if(myHref !== undefined && myHref.match(/\?file\=/)){ 333 //ãã¡ã¤ã«ãã¦ã³ãã¼ãã§beforeunloadãèµ°ãã®ã§å¦çãéããªãããã« 334 dlFlg = true; 335 336 setTimeout(function() { 337 dlFlg = false; 338 sendFlg = false; 339 },1000); 340 } 341 //ãã¼ã 342 //DS 343 // }else if($_this.parents('.parts').length){ 344 //CS 345 }else if($_this.parents('.SideArea').length || $_this.parents('#HeaderArea').length || $_this.parents('#HeaderArea').length ||ã$_this.parents('#DownArea').length || $_this.parents('#FooterArea').length){ 346 347 var $parts = $_this.parents('.parts'); 348 349 contents = 'parts'; 350 351 if($parts.attr('data-parts-id') !== undefined){ 352 id1 = $parts.data('parts-id'); 353 //selector += ".parts[data-parts-id='"+id1+"'] "; 354 //SPãããã¼ããã¿ã¼ 355 }else if($parts.attr('id') !== undefined){ 356 id1 = $parts.data('id'); 357 //selector += "#" + $parts.attr('id') + "[data-id='"+id1+"'] "; 358 359 } 360 361 //ã¬ã³ã¼ããããå ´å(ãªã³ã¯ãå°å³) 362 if($_this.parents('.parts-record').length){ 363 id2 = $_this.parents('.parts-record').data('record-id'); 364 //selector += ".parts-record[data-record-id='"+id2+"']"; 365 } 366 } 367 368 data = { 369 'contents':contents, 370 'element' :attrsStr, 371 'x' :position['x'], 372 'y' :position['y'], 373 'page_id' :pageId, 374 'id1' :id1, 375 'id2' :id2, 376 'selector':selector, 377 }; 378
379 var notClickFlg = false; 380 381 //CSç¬èªããã©ã¼ã ã®step 382 if(tagName == 'input' && $_this.attr('type') != undefined && $_this.attr('type') == 'submit'){ 383 if($_this.attr('name') != undefined){ 384 var name = $_this.attr('name'); 385 if(name.match(/\[confirm\]/)){ 386 cs_form_step = 'confirm'; 387 }else if(name.match(/\[send\]/)){ 388 cs_form_step = 'complete'; 389 }else if(name.match(/\[back\]/)){ 390 cs_form_step = 'return'; 391 } 392 } 393 } 394 395 //console.log($_this.attr('onclick').length); 396 //ãåãåããï¼ç¢ºèªãã©ã¼ã ï¼ 397 if($_this.attr('onclick') !== undefined){ 398 399 if( $_this.attr('onclick').match(/type019\_forms/)){ 400 notClickFlg = true; 401 402 var fid = $_this.attr('onclick').match(/fid\=([a-z0-9]{32})\//); 403 if($_this.attr('onclick').match(/step\=form/)){ 404 var data = { 405 'page_id' :pageId, 406 'id1' :id1, 407 'id2' :id2, 408 'step' :'return', 409 'fid' :fid[1] 410 }; 411 }else if($_this.attr('onclick').match(/step\=confirm/)){ 412 var data = { 413 'page_id' :pageId, 414 'id1' :id1, 415 'id2' :id2, 416 'step' :'complete', 417 'fid' :fid[1] 418 }; 419 } 420 $.insertUAObj('contact',data); 421 // $.sendDataCheck($_this); 422 } 423 } 424 425 //éå ¬éã¦ã¼ã¶ã¼ãã°ã¢ã¦ã 426 //DS 427 //if($_this.hasClass('logout')){ 428 //CS 429 if(myHref.match(/\/logout\//)){ 430 notClickFlg = true; 431 var data = {'close_user_name':closeUserName}; 432 $.insertUAObj('close_user_logout',data); 433 } 434 435 if(!notClickFlg){ 436 $.insertUAObj('click',data); 437 //å¤é¨ãªã³ã¯ãããããã¨ãã®å¯¾å¿ 438 if(myHref != '' && tagName == 'a' && $_this.attr('target') != undefined && $_this.attr('target') == '_blank'){ 439 another_tab_flg = true; 440 $.sendDataCheck($_this); 441 } 442 } 443 } 444 } 445 }, 446 //onclick屿§çºåã®åã«ã¯ãªãã¯ã¤ãã³ããã¤ããããã 447 firstEventAdd:function() { 448 449 //CS 450 //ãã¡ãã®å¦çã¯ãã¼ã¸ã§ã³ã®éãã«ãã£ã¦ã¤ãã³ããåå¾ã§ããªããããget_uuid.tplã¸ç§»æ¤ 451 //DS 452 //ç¡é§ã«ã¤ãã³ããã¤ããªããããã¤ãã³ããã¤ãã¦ããdivã ãã«ã¯ãªãã¯ã¤ãã³ããã¤ãã 453 // $('div').each(function(index){ 454 // var events = $._data($(this).get(0), "events"); 455 // if(events !== undefined){ 456 // if(events.click !== undefined){ 457 // if($(this).attr('id') == undefined || ($(this).attr('id') !== undefined && $(this).attr('id') != 'bg')){ 458 // $(this).on('click tap',function(e){
459 // $.getClick(e); 460 // }); 461 // } 462 // } 463 // } 464 465 // }); 466 467 //onclickçºååã«ãã¯ãªãã¯ãã¼ã¿ãåå¾ããããã«ãã¯ãªãã¯ãã¼ã¿åå¾å¦çãå²ãè¾¼ã¾ãã 468 $('a[onClick],button[onClick],input[onClick]').each(function(){ 469 var $target = $(this); 470 var onclick = $target.attr('onclick'); 471 var addOnclick = '$jq.getClick($jq(this),true); ' + onclick; 472 $target.attr('onclick',addOnclick); 473 }); 474 }, 475 sendDataCheck:function($elem){ 476 //äºééä¿¡é²æ¢ 477 if(!sendFlg){ 478 479 sendFlg = true; 480 481 if(dlFlg === false){ 482 483 if(Object.keys(UserActionObject).length){ 484 $.sendData($elem); 485 } 486 487 } 488 } 489 }, 490 getDate: function() { 491 var date2 = new Date(); 492 var YY2 = date2.getFullYear(); 493 var MM2 = ('0' + (date2.getMonth() + 1)).slice(-2); 494 var DD2 = ('0' + date2.getDate()).slice(-2); 495 var H2 = ('0' + (date2.getHours())).slice(-2); 496 var i2 = ('0' + (date2.getMinutes())).slice(-2); 497 var s2 = ('0' + (date2.getSeconds())).slice(-2); 498 499 return YY2 +'/'+ MM2+'/'+ DD2 + ' ' + H2 + ':' + i2 + ':' + s2; 500 }, 501 insertUAObj:function(type,data){ 502 503 var time = $.getDate(); 504 505 var key = Object.keys(UserActionObject).length; 506 507 data['type'] = type; 508 data['created'] = time; 509 510 //æ¢åå¦çã§ã¯ãªãã¯ã¤ãã³ããï¼åèµ°ãã¨ããããã£ãã
510®ã§ãåæå»ï¼ç§ï¼ã«åãã¿ã¤ãã®å¦çãã¯ããã°ãï¼åç®ä»¥éã¯ã¨ããªã 511 var noInsert = false; 512 //divã¨aããã¶ããªã©ãã¦ãã¤ãã³ããåæã«èµ°ããã¨ãããã®ã§ã䏿¦ãã¹ã¦ã®ãã°ãåå¾ãã¾ã 513 // if(type == 'click'){ 514 // for (var i = 0; i < key; i++) { 515 // if(UserActionObject[i]['type'] == type && UserActionObject[i]['created'] == time){ 516 // noInsert = true; 517 // } 518 // } 519 // } 520 521 522 if(type == 'click'){ 523 for (var i = 0; i < key; i++) { 524 if(UserActionObject[i]['type'] == type && UserActionObject[i]['created'] == time && UserActionObject[i]['element'] == data['element']){ 525 noInsert = true; 526 } 527 } 528 } 529 530 if(!noInsert){ 531 UserActionObject[key] = data; 532 } 533 534 535 }, 536 sendData:function($elem){ 537 538 modified = $.getDate(); 539 540 var sendObj = {}; 541 var url = location.href; 542 543 sendObj['queryParameters'] = { 544 serialno:Serial, 545 uuid :public_uuid, 546 url : url, 547 data :JSON.stringify(UserActionObject), 548 created :created, 549 modified:modified, 550 } 551 552 $.ajax({
553 type : "POST", 554 cache : false, 555 data : JSON.stringify(sendObj), 556 async : false, 557 url : 'https://9e2xkh9f1e.execute-api.ap-northeast-1.amazonaws.com/v1/putActionData', 558 contentType:'application/json', 559 dataType:'json', 560 success : function(data) { 561 //console.log('success'); 562 // console.log(JSON.stringify(data)); 563 564 },error : function(data){ 565 // console.log('error'); 566 // console.log(JSON.stringify(data)); 567 },complete:function(data){ 568 //console.log('complete'); 569 if($elem && $elem.length){ 570 //ã¿ã° 571 var tagName = $elem.prop("tagName").toLowerCase(); 572 if(tagName == 'form'){ 573 $elem.submit(); 574 } 575 } 576 } 577 }); 578 579 if($elem && $elem.length){ 580 var tagName = $elem.prop("tagName").toLowerCase(); 581 if(tagName == 'form'){ 582 $elem.submit(); 583 } 584 } 585 586 UserActionObject = {}; 587 588 if(another_tab_flg == true){ 589 $.getUa(); 590 another_tab_flg = false; 591 sendFlg = false; 592 } 593 594 }, 595 getPosition:function(e){ 596 //analysis.jsããã¾ãã£ã¨ã³ãã¼ 597 598 //#4766 window èå¥ 599 if(!window.name){ 600 var rum = Math.ceil(Math.random() * 100); 601 var now = Date.now() /1000; 602 var win_name = Math.ceil(now * rum); 603 window.name = win_name; 604 } 605 606 //#2297 ã·ã³ã°ã«ãã¼ã¸ å¯¾å¿ 607 if ($sectionType.length) { 608 $params = $bg; 609 siteType = ($params.data('device') == 'smart')? 'SP' : 'PC'; 610 } 611 612 var offset = 0, 613 x, y, pageID, data; 614 615 //#2297 ã·ã³ã°ã«ãã¼ã¸ å¯¾å¿ 616 var sp_flg = false; 617 var sp_full_flg = false; 618 var scroll = 0; 619 620 621 if ($sectionType.length) { 622 var centerW = $sectionType.eq(0).width(); 623 var sectionh = $section.eq(0).height(); 624 var centerh = $sectionType.eq(0).height(); 625 scroll = $window.scrollTop(); 626 width = $bg.width(); 627 sp_flg = true; 628 pos2_header = 0; 629 pos2_footer = 0; 630 pos2_other = 0; 631 632 page_bottom =0; 633 634 if ($bg.data('sp-type') == 1 && siteType == 'PC') { 635 636 //ããã¿ã¼ãåºå®ããã¼ãåºå®ã¡ãã¥ã¼ã®å ´åã¯é«ã微調æ´(åºå®ã®ã¨ããã£ããã£ã¼ä½ç½®ã¯ä¸ã«) 637 var st_index = ($('section.section').filter('.active').length)? $('section.section').index($('section.section').filter('.active')) : 0; 638 639 scroll = sectionh * st_index; 640 641 //ããã¿ã¼ãåºå®ããã¼ãåºå®ã¡ãã¥ã¼å¯¾å¿ç¨ 642 page_bottom = sectionh * parseInt($('section.section').length); 643 if($bg.find("#header").length && !$bg.find("#header.pos2").length){ 644 page_bottom += parseInt($bg.find("#header").height()); 645 } 646 647 }else{ 648 //ãã©ã©ãã¯ã¹ä»¥å¤ã¯ãæå¾ã®ã»ã¯ã·ã§ã³ã®ä½ç½®ããè¨ç® 649 var lt_index = $('section.section').length - 1; 650 var $_lt_sction = $('section.section').eq(lt_index); 651 652 page_bottom = parseInt($_lt_sction.position().top) + parseInt($_lt_sction.height()); 653
654 if($bg.find("#header").length && !$bg.find("#header.pos2").length){ 655 page_bottom += parseInt($bg.find("#header").height()); 656 } 657 } 658 659 //matu ãããã¼åºå®æå¯¾å¿ 660 if($(e.target).closest("#header").length && !($bg.find("#header.pos2").length && !$bg.find("#header").hasClass("normal-header"))){ 661 //pos2_header = $bg.find("#header.pos2").height(); 662 } 663 664 pageID = $bg.data('page-id'); 665 } else { 666 var centerW = $centerArea.width(); 667 } 668 669 //111.5 670 if (siteType == 'PC') { 671 offset = (width - centerW) / 2; 672 } 673 674 // ã¯ãªãã¯ä½ç½®ã®åº§æ¨ï¼ã³ã³ãã³ãé åã®ã¿ã§ç®åº) 675 if (sp_flg) { 676 if (siteType == 'PC') { 677 offset = (width >= centerW && !($(e.target).closest("#header").length || $(e.target).closest("#footer").length || $(e.target).closest("#fixedbanner").length)) ? (width - centerW) / 2 : 0; 678 } 679 x = e.clientX - offset; 680 y = e.clientY + scroll + pos2_header; 681 682 683 //#2297 ã·ã³ã°ã«ãã¼ã¸ å¯¾å¿ 684 if ($bg.data('sp-type') == 1 && siteType == 'PC') { 685 //ãã©ã©ãã¯ã¹ã¿ã¤ã 686 //1020:573.75 = 16:9 (1020ã¯ãã£ããã£ãµã¤ãº) 687 y = (y - (((sectionh - centerh) / 2) * st_index)) + pos2_header; 688 if($(e.target).closest("#header").length || $(e.target).closest("#footer").length || $(e.target).closest("#fixedbanner").length){ 689 x = Math.round(x * (1020 / width)); 690 }else{ 691 x = Math.round(x * (1020 / centerW)); 692 } 693 y = Math.round(y * (573.75 / sectionh)); 694 }else if(!$bg.data('sp-type') && siteType == 'PC'){ 695 //ã·ã³ã°ã«ãã¼ã¸ 696 //ãããã¼ãããã¿ã¼ãåºå®ããã¼ã¯å¯å¤ã§ãããã®ã§èª¿æ´ 697 if(($(e.target).closest("#header").length &&!$(e.target).closest("#header").hasClass("normal-header")) || $(e.target).closest("#footer").length || $(e.target).closest("#fixedbanner").length){ 698 //ç¾å¨ãã¼ãããããã£ããã£ã¼ã®1100ãªã®ã§ 699 //x = Math.round(x * (1100 / centerW)); 700 x = Math.round(x * (1100 / width)); 701 } 702 } 703 704 if($(e.target).closest("#header").length && (($bg.find("#header.pos2").length && !$bg.find("#header").hasClass("normal-header")) || $bg.find("#header.a-logo-fixed").length && siteType != 'PC')){ 705 //y = e.clientY - parseInt($(e.target).closest("#header.pos2").position().top); 706 y = e.clientY; 707 } 708 709 //ããã¿ã¼ãåºå®ããã¼ãåºå®ã¡ãã¥ã¼ã®å ´åã¯é«ã微調æ´(åºå®ã®ã¨ããã£ããã£ã¼ä½ç½®ã¯ä¸ã«) 710 if($(e.target).closest("#footer.pos2").length){ 711 // || $(e.target).closest("#fixedbanner.pos2").length) { 712 pos2_footer = $(e.target).closest("#footer.pos2").height(); 713 y = page_bottom - pos2_footer + (e.clientY - parseInt($(e.target).closest("#footer.pos2").position().top)); 714 } 715 716 if($(e.target).closest("#fixedbanner.pos2").length) { 717 //ããã¿ã¼ã®ä¸ã«ããã®ã§ 718 if($bg.find("#footer").length && !$bg.find("#footer").hasClass("pos2")){ 719 page_bottom += $bg.find("#footer").height(); 720 } 721 y = page_bottom + (e.clientY - parseInt($(e.target).closest("#fixedbanner.pos2").position().top)); 722 723 } 724 725 } else { 726 x = e.clientX - offset; 727 y = e.clientY + $window.scrollTop(); 728 } 729 730 return {'x':x,'y':y}; 731 732 }, 733 getScroll:function(){ 734 //analysis.jsããã¾ãã£ã¨ã³ãã¼ 735 736 var scrolltimer = false; 737 var visittimer = false; 738 var scPageID = pageId; 739 var sc_data = {}; 740 var scroll_y = $window.scrollTop(); 741 var scroll_x = $window.scrollLeft(); 742 743 // 744 visittimer = setInterval(function() { 745 // éä¿¡ãã¼ã¿ 746 sc_data = { 747 x : scroll_x, 748 y : scroll_y, 749 page_id : scPageID, 750 site_type : siteType, 751 url : location.href, 752 'window' : width + ',' + height, 753 'height' : height, 754 'width' : width, 755 'page_size' : $bg.width() + ',' + $bg.height(), 756 }; 757 758 // çµäºæã«ã¿ã¤ãã¼ãåã 759 clearTimeout(visittimer); 760 }, 2); 761 762 // ã¹ã¯ãã¼ã« 763 $(window).scroll(function() { 764 if (visittimer !== false) { 765 clearTimeout(visittimer); 766 } 767 if (scrolltimer !== false) { 768 clearTimeout(scrolltimer); 769 } 770 771 scrolltimer = setTimeout(function() { 772 scroll_y = $window.scrollTop(); 773 scroll_x = $window.scrollLeft(); 774 775 // éä¿¡ãã¼ã¿ 776 sc_data = { 777 x : scroll_x, 778 y : scroll_y, 779 page_id : scPageID, 780 site_type : siteType, 781 // url : location.href, 782 'window' : width + ',' + height, 783 'height' : height, 784 'width' : width, 785 'page_size' : $bg.width() + ',' + $bg.height(), 786 }; 787 788 $.insertUAObj('scroll',sc_data); 789 790 }, 2000); 791 }); 792 793 } 794 ,getResize:function(){ 795 796 //analysis.jsããã¾ãã£ã¨ã³ãã¼ 797 798 var resizetimer = false; 799 var visittimer = false; 800 var scPageID = pageId; 801 var re_data = {}; 802 var width = $window.width(); 803 var height = $window.height(); 804 805 // 806 visittimer = setInterval(function() { 807 // éä¿¡ãã¼ã¿ 808 sc_data = { 809 page_id : scPageID, 810 site_type : siteType, 811 // url : location.href, 812 'window' : width + ',' + height, 813 'height' : height, 814 'width' : width, 815 'page_size' : $bg.width() + ',' + $bg.height(), 816 }; 817 818 // çµäºæã«ã¿ã¤ãã¼ãåã 819 clearTimeout(visittimer); 820 }, 2); 821 822 // ã¹ã¯ãã¼ã« 823 $(window).resize(function() { 824 if (visittimer !== false) { 825 clearTimeout(visittimer); 826 } 827 if (resizetimer !== false) { 828 clearTimeout(resizetimer); 829 } 830 831 resizetimer = setTimeout(function() { 832 var width = $window.width(); 833 var height = $window.height(); 834 // éä¿¡ãã¼ã¿ 835 re_data = { 836 page_id : scPageID, 837 site_type : siteType, 838 // url : location.href, 839 'window' : width + ',' + height, 840 'height' : height, 841 'width' : width, 842 'page_size' : $bg.width() + ',' + $bg.height(), 843 }; 844 845 $.insertUAObj('resize',re_data); 846 847 }, 2000); 848 }); 849 },getYTplayer:function(status,id){ 850 851 var $_this = $('#'+id); 852 var src = $_this.attr('src'); 853 854 if($_this.length){ 855 if(status == 1){ 856 857 var id1 = $_this.parents('.block').data('block-id'); 858 var id2 = $_this.parents('.record').data('record-id'); 859 860 var attrs = $_this.get(0).attributes; 861 var attrsStr = '<iframe '; 862 863 for (var i = 0; i < attrs.length; i++) { 864 attrsStr += attrs[i]['name']; 865 if(attrs[i]['value'] != ''){ 866 attrsStr += "='" + attrs[i]['value'] + "'"; 867 } 868 attrsStr += " "; 869 } 870 871 attrsStr += '>'; 872 873 if(src.match(/autoplay\=0/) || YTPlayFlg){ 874 var data = { 875 'event' :'play', 876 'page_id' :pageId, 877 'id1' :id1, 878 'id2' :id2, 879 'element' :attrsStr, 880 }; 881 $.insertUAObj('youtube',data); 882 } 883 YTPlayFlg = true; 884 }else if(status == 3){ 885 YTAutoPauseFlg = true; 886 }else if(status == 2){ 887 888 var id1 = $_this.parents('.block').data('block-id'); 889 var id2 = $_this.parents('.record').data('record-id'); 890 891 var attrs = $_this.get(0).attributes; 892 var attrsStr = '<iframe '; 893 894 for (var i = 0; i < attrs.length; i++) { 895 attrsStr += attrs[i]['name']; 896 if(attrs[i]['value'] != ''){ 897 attrsStr += "='" + attrs[i]['value'] + "'"; 898 } 899 attrsStr += " "; 900 } 901 902 attrsStr += '>'; 903 904 setTimeout(function(){ 905 if(!YTAutoPauseFlg){ 906 var data = { 907 'event' :'pause', 908 'page_id' :pageId, 909 'id1' :id1, 910 'id2' :id2, 911 'element' :attrsStr, 912 }; 913 914 $.insertUAObj('youtube',data); 915 } 916 YTAutoPauseFlg = false; 917 }, 100); 918 } 919 920 } 921 },getUa:function(){ 922 923 created = $.getDate(); 924 925 var data = { 926 ua:ua, 927 window:winSize, 928 x:scroll_x, 929 y:scroll_y, 930 close_user_name:closeUserName, 931 close_user_id:closeUserId, 932 unique_page_id:uniquePageId 933 }; 934 935 $.insertUAObj('user_agent',data); 936 937 $.getScroll(); 938 $.getResize(); 939 940 $.firstEventAdd(); 941 942 } 943 }); 944 945 $(document).ready(function(){ 946 947 //get_uuid.tplã«ç§»æ¤ 948 // if($cookie == undefined){ 949 // $.ajax({
950 // type: 'GET', 951 // url : 'https://9e2xkh9f1e.execute-api.ap-northeast-1.amazonaws.com/v1/getUniqueUserId', 952 // crossDomain:true, 953 // xhrFields: { 954 // withCredentials: true 955 // }, 956 // success: function(data) { 957 // var uuid = JSON.stringify(data['body']['uuid']); 958 // var rep_uuid = uuid.replace(/\"/g,''); 959 960 // $.cookie("__ds_uuid",rep_uuid,{ 961 // expires:730, 962 // //path: '/', 963 // path : BaseUrl 964 // }); 965 966 // $cookie = $.cookie('__ds_uuid'); 967 // public_uuid = $cookie; 968 // }, 969 // error:function(data){ 970 // //console.log('er'); 971 // //console.log(data); 972 // } 973 // }); 974 // } 975 976 $.getUa(); 977 }); 978 979 980 }); 981}($jq);
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.