1// Microsoft Clarityãã»ããã¢ãã 2let ins_clarity = document.createElement('script'); 3ins_clarity.type = 'text/javascript'; 4ins_clarity.innerText = '\ 5(function(c,l,a,r,i,t,y){\ 6 c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};\ 7 t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;\ 8 y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);\ 9})(window, document, "clarity", "script", "e0rwurnbjq")'; 10document.getElementsByTagName('head')[0].insertAdjacentElement('beforeend', ins_clarity); 11 12var is_policy_measures = false; 13// i-mobileãå©ç¨ããå²å 14const use_imobile_ratio = 5; 15// switch_next_adã§i-mobileã¨adnicoã交äºã«è¡¨ç¤º 16var next_ad = null; 17 18if(ld_blog_vars["current_page"]["type"] === "article"){ 19 var categorys = ld_blog_vars["articles"][0]["categories"]; 20 categorys.forEach(function(category){ 21 if(category["name"] == 'XXXX'){ 22 is_policy_measures = true; 23 // æåã«è¡¨ç¤ºããåºåç¨®ãæ±ºå® 24 if(get_random() <= use_imobile_ratio){ 25 next_ad = 'i-mobile' 26 } else { 27 next_ad = 'adnico' 28 } 29 } 30 }); 31} 32 33// 1ã10ã®æ´æ°ãã©ã³ãã ã«çæ 34function get_random(){ 35 return random = Math.floor(Math.random() * 10) + 1; 36} 37 38// 交äºã«è¡¨ç¤ºããããæ¬¡ã«è¡¨ç¤ºããåºåãã¹ã¤ãã 39function switch_next_ad(next_ad){ 40 if(next_ad === 'i-mobile'){ 41 next_ad = 'adnico'; 42 } else if (next_ad === 'adnico') { 43 next_ad = 'i-mobile'; 44 } 45 return next_ad; 46} 47(function() { 48 var Lib = {}; 49 50// Device 51Lib.Device = { 52 isMobile: function() { 53 return /(?:iPhone|iPad|iPod|Android|Mobile)/.test(navigator.userAgent) === true; 54 } 55}; 56 57// Time 58Lib.Time = { 59 now: (new Date()).getTime(), 60 // beginStr, endStr: YYYYMMDD[HH[mm[ss]]] 61 // ex. if (Lib.Time.isInsidePeriod('20190809131200', '20190810000000')) {} 62 isInsidePeriod: function(beginStr, endStr) { 63 var beginNum = beginStr.replace(/[^\d]/g, ''); 64 if (beginNum.length < 8) return false; 65 var beginYear = parseInt(beginNum.substr(0, 4), 10); 66 var beginMonth = parseInt(beginNum.substr(4, 2), 10) - 1; 67 var beginDay = parseInt(beginNum.substr(6, 2), 10); 68 var beginHour = parseInt(beginNum.substr(8, 2), 10) || 0; 69 var beginMin = parseInt(beginNum.substr(10, 2), 10) || 0; 70 var beginSec = parseInt(beginNum.substr(12, 2), 10) || 0; 71 var beginDate = (new Date( 72 beginYear, 73 beginMonth, 74 beginDay, 75 beginHour, 76 beginMin, 77 beginSec 78 )).getTime(); 79 var endNum = endStr.replace(/[^\d]/g, ''); 80 if (endNum.length < 8) return false; 81 var endYear = parseInt(endNum.substr(0, 4), 10); 82 var endMonth = parseInt(endNum.substr(4, 2), 10) - 1; 83 var endDay = parseInt(endNum.substr(6, 2), 10); 84 var endHour = parseInt(endNum.substr(8, 2), 10) || 0; 85 var endMin = parseInt(endNum.substr(10, 2), 10) || 0; 86 var endSec = parseInt(endNum.substr(12, 2), 10) || 0; 87 var endDate = (new Date( 88 endYear, 89 endMonth, 90 endDay, 91 endHour, 92 endMin, 93 endSec 94 )).getTime(); 95 96 if (Lib.Time.now < beginDate || endDate < Lib.Time.now) return false; 97 return true; 98 } 99}; 100 101Lib.Fif = { 102 uuid: function() { 103 // https://github.com/GoogleChrome/chrome-platform-analytics/blob/master/src/internal/identifier.js 104 let chars = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.split(''); 105 for (let i = 0, len = chars.length; i < len; i++) { 106 switch (chars[i]) { 107 case 'x': 108 chars[i] = Math.floor(Math.random() * 16).toString(16); 109 break; 110 case 'y': 111 chars[i] = (Math.floor(Math.random() * 4) + 8).toString(16); 112 break; 113 } 114 } 115 return chars.join(''); 116 }, 117 write: function(targetClass, content, width, height) { 118 var proc = function() { 119 var elements = document.getElementsByClassName(targetClass); 120 if (elements.length < 1) return; 121 var target = elements[0]; 122 var iframe = document.createElement('iframe'); 123 iframe.width = width; 124 iframe.height = height; 125 iframe.frameBorder = "0"; 126 iframe.scrolling = "no"; 127 iframe.marginWidth = 0; 128 iframe.marginHeight = 0; 129 iframe.src = "about:self"; 130 target.appendChild(iframe); 131 var doc = iframe.contentWindow.document; 132 doc.open(); 133 var d = ""; 134 d += '<html><head></head>'; 135 d += '<body>'; 136 d += content; 137 d += '<script>inDapIF = true;</script>'; 138 d += '</body></html>'; 139 doc.write(d); 140 doc.close(); 141 } 142 143 Lib.attachEventListener(proc); 144 } 145}; 146 147Lib.Track = { 148 page: '', 149 generateDomTreeIndex: function(element, text) { 150 var label = text.replace(/"/g, ''); 151 var selector = 'a[data-track-label="' + label + '"]'; 152 var num = document.querySelectorAll(selector).length; 153 element.setAttribute('data-track-label', label); 154 element.setAttribute('data-track-index', num); 155 return num; 156 }, 157 isExternalUrl: function(url) { 158 var match = url.match(/^(?:https?:)\/\/([^\/]+)/); 159 if (match === null || match[1] === document.domain) return false;
160 return true; 161 }, 162 begin: function() { 163 var Lib = Lib || {}; 164 Lib.Track = Lib.Track || this; 165 166 if (Lib.Track.page === '') return; 167 168 var aElements = document.getElementsByTagName('a'); 169 Array.prototype.forEach.call(aElements, function(aElement) { 170 var eventHref = aElement.getAttribute('href') || ''; 171 var eventText = (aElement.innerText || aElement.innerHTML || '') 172 .replace(/\r|\n/g, ' ') 173 .replace(/\s+/g, ' ') 174 .trim() + ' (' + eventHref + ')'; 175 var eventIndex = Lib.Track.generateDomTreeIndex(aElement, eventText); 176 var eventLabrl = eventText + ' [' + eventIndex + '] '; 177 var eventAction = Lib.Track.page 178 + ( 179 Lib.Track.isExternalUrl(eventHref) 180 ? 'External' 181 : 'Internal' 182 ) 183 + 'LinkClick'; 184 var proc = function(e) { 185 ga('send', 'event', { 186 eventCategory: 'LinkClick', 187 eventAction: eventAction, 188 eventLabel: eventLabrl, 189 transport: 'beacon' 190 }); 191 } 192 193 if (aElement.addEventListener) { 194 aElement.addEventListener('click', proc, false); 195 } else if (window.attachEvent) { 196 aElement.attachEvent('onclick', proc); 197 } 198 }); 199 }, 200 beginAfterLoaded: function(page) { 201 Lib.Track.page = page; 202 var proc = Lib.Track.begin.bind(Lib.Track); 203 204 if (window.addEventListener) { 205 window.addEventListener('load', proc, false); 206 } else if (window.attachEvent) { 207 window.attachEvent('onload', proc); 208 } 209 } 210}; 211 212// Policy 213//Lib.Policy = function() { 214// var instance = null; 215// 216// Lib.Policy = function() { 217// if ((this instanceof Lib.Policy) == false) { 218// throw new Error('Please create instance of Lib.Policy.'); 219// } 220// 221// return instance; 222// }; 223// 224// Lib.Policy.prototype = this; 225// instance = new Lib.Policy(); 226// instance.constructor = Lib.Policy; 227// instance._isSafe = instance.isSafe(); 228// return instance; 229//}; 230// 231//Lib.Policy.prototype.isSafe = function() { 232// return true; 233//} 234 235// Ads 236Lib.Ads = function(isSafe) { 237 var isSafe = typeof isSafe === 'undefined' ? true : isSafe; 238 if ((this instanceof Lib.Ads) == false) { 239 throw new Error('Please create instance of Lib.Ads.'); 240 } 241 242 //var policy = new Lib.Policy(); 243 //this._isSafe = (policy._isSafe == true); 244 this._isSafe = true; 245 this._totalRates = 0; 246 this._items = []; 247}; 248 249Lib.Ads.prototype.isSafe = function() { 250 return this._isSafe; 251}; 252 253Lib.Ads.prototype.add = function(proc, rate, allowSafeOnly) { 254 var allowSafeOnly = typeof allowSafeOnly === 'undefined' ? false : allowSafeOnly; 255 if (this._isSafe == false && allowSafeOnly == true) return; 256 this._totalRates += rate; 257 this._items.push({ 258 proc: proc, 259 rate: rate 260 }); 261}; 262 263Lib.Ads.prototype.run = function() { 264 var proc = null; 265 var limit = 0; 266 var sample = Math.floor(Math.random() * this._totalRates); 267 for (var index in this._items) { 268 var item = this._items[index]; 269 limit += item.rate; 270 if (limit <= sample) continue; 271 proc = item.proc; 272 break; 273 } 274 if (proc == null) return; 275 return proc(); 276} 277 278// attachEventListener 279Lib.attachEventListener = function(proc) { 280 if (window.addEventListener) { 281 //window.addEventListener('load', proc, false); 282 document.addEventListener('DOMContentLoaded', proc, false); 283 } else if (window.attachEvent) { 284 window.attachEvent('onload', proc); 285 } else { 286 //window.onload = proc; 287 } 288}; 289 290 291//Lib.Policy.prototype.isSafe = isSafePage; 292 293 // if(is_policy_measures === true){ 294 // if(next_ad === 'i-mobile'){ 295 // document.write('\ 296 // <!-- usi32_pc_imp_article_01_left -->\ 297 // <div id="im-60e10841d8ad42c2be052c67539c344b">\ 298 // <script async src="//imp-adedge.i-mobile.co.jp/script/v1/spot.js?20181121"></script>\ 299 // <script>(window.adsbyimobile=window.adsbyimobile||[]).push({pid:44464,mid:526469,asid:1718634,type:"banner",display:"inline",elementid:"im-60e10841d8ad42c2be052c67539c344b"})</script>\ 300 // </div>\ 301 // '); 302 // } else { 303 // document.write('\ 304 // <!-- usi32_pc_imp_article_01_left -->\ 305 // <!-- ad tags Size: 300x250 ZoneId:1495788-->\ 306 // <div style="padding:15px 0;">\ 307 // <script type="text/javascript" src="https://js.adnico.jp/t/495/788/a1495788.js"></script>\ 308 // </div>\ 309 // '); 310 // } 311 // next_ad = switch_next_ad(next_ad); 312 // } else { 313 (function() { 314 document.write('\ 315 <script type="text/javascript">\ 316 var pbjs = pbjs || {};\ 317 pbjs.que = pbjs.que || [];\ 318 var hbScriptTag = document.createElement("script");\ 319 hbScriptTag.setAttribute("type", "text/javascript");\ 320 hbScriptTag.setAttribute("async", "async");\ 321 hbScriptTag.setAttribute("src", "https://flux-cdn.com/client/00374/usi32_00561.min.js");\ 322 document.getElementsByTagName("head")[0].appendChild(hbScriptTag);\ 323 </script>\ 324 '); 325 326 document.write('\ 327 <script type="text/javascript">\ 328 var googletag = googletag || {};\ 329 googletag.cmd = googletag.cmd || [];\ 330 var gptScriptTag = document.createElement("script");\ 331 gptScriptTag.setAttribute("type", "text/javascript");\ 332 gptScriptTag.setAttribute("async", "async");\ 333 gptScriptTag.setAttribute("src", "https://securepubads.g.doubleclick.net/tag/js/gpt.js");\ 334 document.getElementsByTagName("head")[0].appendChild(gptScriptTag);\ 335 </script>\ 336 '); 337 338 document.write('\ 339 <script type="text/javascript">\ 340 window.fluxtag = {\ 341 intersectionObserver: null,\ 342 lazyAdUnits: [],\ 343 lazyOption: { rootMargin: window.screen.height * 2 + "px" },\ 344 readyBids: {\ 345 prebid: false,\ 346 amazon: false,\ 347 google: false,\ 348 },\ 349 failSafeTimeout: 3e3,\ 350 isFn: function (object) {\ 351 var _t = "Function";\ 352 var toString = Object.prototype.toString;\ 353 return toString.call(object) === "[object " + _t + "]";\ 354 },\ 355 launchAdServer: function () {\ 356 if (!fluxtag.readyBids.prebid || !fluxtag.readyBids.amazon) {\ 357 return;\ 358 }\ 359 fluxtag.requestAdServer();\ 360 },\ 361 requestAdServer: function () {\ 362 if (!fluxtag.readyBids.google) {\ 363 fluxtag.readyBids.google = true;\ 364 googletag.cmd.push(function () {\ 365 if (\ 366 !!pbjs.setTargetingForGPTAsync &&\ 367 fluxtag.isFn(pbjs.setTargetingForGPTAsync)\ 368 ) {\ 369 pbjs.que.push(function () {\ 370 pbjs.setTargetingForGPTAsync();\ 371 });\ 372 }\ 373 googletag.pubads().refresh();\ 374 });\ 375 }\ 376 },\ 377 renderAds: function (lines) {\ 378 googletag.cmd.push(function () {\ 379 var refreshLines = [];\ 380 var params = (function () {\ 381 var readyBids = {\ 382 amazon: false,\ 383 google: false,\ 384 prebid: false,\ 385 };\ 386 var refreshSlots = [];\ 387 var apsSlots = [];\ 388 var divIds = [];\ 389 var apsDivIds = [];\ 390 var definedSlots = [];\ 391 var displayDivIds = [];\ 392 \ 393 googletag\ 394 .pubads()\ 395 .getSlots()\ 396 .forEach(function (slot) {\ 397 definedSlots[slot.getSlotElementId()] = slot;\ 398 });\ 399 for (var i = 0; i < lines.length; i++) {\ 400 var divId = lines[i].divId;\ 401 var adUnitCode = lines[i].code;\ 402 var sizes = lines[i].sizes;\ 403 var isAps = lines[i].isAps || false;\ 404 refreshLines.push({\ 405 code: adUnitCode,\ 406 size: sizes,\ 407 id: divId,\ 408 });\ 409 if (definedSlots[divId]) {\ 410 refreshSlots.push(definedSlots[divId]);\ 411 } else {\ 412 refreshSlots.push(\ 413 googletag\ 414 .defineSlot(adUnitCode, sizes, divId)\ 415 .addService(googletag.pubads())\ 416 );\ 417 displayDivIds.push(divId);\ 418 }\ 419 divIds.push(divId);\ 420 if (isAps) {\ 421 apsSlots.push({\ 422 slotID: divId,\ 423 slotName: adUnitCode,\ 424 sizes: sizes.filter(function(size) {\ 425 return size !== "fluid";\ 426 }),\ 427 });\ 428 apsDivIds.push(divId);\ 429 }\ 430 }\ 431 if (apsSlots.length === 0) {\ 432 readyBids.amazon = true;\ 433 }\ 434 var adServerSend = function () {\ 435 if (!readyBids.amazon || !readyBids.prebid) {\ 436 return;\ 437 }\ 438 if (!readyBids.google) {\ 439 readyBids.google = true;\ 440 for (var i = 0; i < displayDivIds.length; i++) {\ 441 googletag.display(displayDivIds[i]);\ 442 }\ 443 if (\ 444 !!pbjs.setTargetingForGPTAsync &&\ 445 fluxtag.isFn(pbjs.setTargetingForGPTAsync)\ 446 ) {\ 447 pbjs.que.push(function () {\ 448 pbjs.setTargetingForGPTAsync(divIds);\ 449 });\ 450 }\ 451 if (\ 452 apsSlots.length > 0 &&\ 453 !!window.apstag &&\ 454 fluxtag.isFn(window.apstag.fetchBids)\ 455 ) {\ 456 window.apstag.setDisplayBids(apsDivIds);\ 457 }\ 458 googletag.pubads().refresh(refreshSlots);\ 459 }\ 460 };\ 461 var apsCallback = function () {\ 462 readyBids.amazon = true;\ 463 adServerSend();\ 464 };\ 465 var prebidCallback = function () {\ 466 readyBids.prebid = true;\ 467 adServerSend();\ 468 };\ 469 setTimeout(function () {\ 470 readyBids.amazon = true;\ 471 readyBids.prebid = true;\ 472 adServerSend();\ 473 }, 3000);\ 474 \ 475 return {\ 476 aps: {\ 477 slots: apsSlots,\ 478 callback: apsCallback,\ 479 },\ 480 prebid: {\ 481 callback: prebidCallback,\ 482 },\ 483 };\ 484 })();\ 485 if (\ 486 !!window.pbFlux &&\ 487 window.pbFlux.refresh &&\ 488 fluxtag.isFn(window.pbFlux.refresh)\ 489 ) {\ 490 pbjs.que.push(function () {\ 491 pbFlux.refresh({\ 492 lines: refreshLines,\ 493 callback: params.prebid.callback,\ 494 timeout: 2000,\ 495 });\ 496 });\ 497 } else {\ 498 params.prebid.callback();\ 499 }\ 500 \ 501 if (\ 502 params.aps.slots.length > 0 &&\ 503 !!window.apstag &&\ 504 fluxtag.isFn(window.apstag.fetchBids)\ 505 ) {\ 506 window.apstag.fetchBids(\ 507 {\ 508 slots: params.aps.slots,\ 509 timeout: 15e2,\ 510 },\ 511 function (bids) {\ 512 params.aps.callback();\ 513 }\ 514 );\ 515 } else {\ 516 params.aps.callback();\ 517 }\ 518 });\ 519 },\ 520 enableLazyLoad: function (lines) {\ 521 if (!fluxtag.intersectionObserver) {\ 522 var options = {\ 523 root: null,\ 524 rootMargin: fluxtag.lazyOption.rootMargin,\ 525 threshold: [1],\ 526 };\ 527 var handleIntersect = function (entries, observer) {\
528 entries.forEach(function (entry) {\ 529 if (entry.isIntersecting) {\ 530 var divId = entry.target.id;\ 531 fluxtag.renderAds(fluxtag.lazyAdUnits[divId]);\ 532 fluxtag.intersectionObserver.unobserve(entry.target);\ 533 }\ 534 });\ 535 };\ 536 fluxtag.intersectionObserver = new IntersectionObserver(\ 537 handleIntersect,\ 538 options\ 539 );\ 540 }\ 541 lines.map(function (line) {\ 542 var el = document.getElementById(line.divId);\ 543 if (!!el) {\ 544 fluxtag.intersectionObserver.observe(el);\ 545 fluxtag.lazyAdUnits[line.divId] = [Object.assign({}, line)];\ 546 }\ 547 });\ 548 },\ 549 };\ 550 //# sourceURL=test1.js\ 551 </script>\ 552 '); 553 554 document.write('\ 555 <script type="text/javascript">\ 556 ! function (a9, a, p, s, t, A, g) {\ 557 if (a[a9]) return;\ 558 \ 559 function q(c, r) {\ 560 a[a9]._Q.push([c, r])\ 561 }\ 562 a[a9] = {\ 563 init: function () {\ 564 q("i", arguments)\ 565 },\ 566 fetchBids: function () {\ 567 q("f", arguments)\ 568 },\ 569 setDisplayBids: function () {},\ 570 targetingKeys: function () {\ 571 return []\ 572 },\ 573 _Q: []\ 574 };\ 575 A = p.createElement(s);\ 576 A.async = !0;\ 577 A.src = t;\ 578 g = p.getElementsByTagName(s)[0];\ 579 g.parentNode.insertBefore(A, g)\ 580 }("apstag", window, document, "script", "//c.amazon-adsystem.com/aax2/apstag.js");\ 581 apstag.init({\ 582 pubID: "989e1997-13fa-4cc7-b3e6-68c9538249ad",\ 583 adServer: "googletag",\ 584 bidTimeout: 1e3\ 585 });\ 586 </script>\ 587 '); 588 document.write('\ 589 <script type="text/javascript">\ 590 if (is_policy_measures === true) {\ 591 googletag.cmd.push(function () {\ 592 googletag.pubads().setTargeting(\'google_policy\', \'stop\');\ 593 });\ 594 }\ 595 </script>\ 596 '); 597})();
598 (function() { document.write('<div id="js-pc-article-01-left"><div id="div-gpt-ad-1654071122273-0"></div></div>'); 599document.write('\ 600 <script type="text/javascript">\ 601 googletag.cmd.push(function () {\ 602 googletag.pubads().disableInitialLoad();\ 603 googletag.enableServices();\ 604 var lines = [\ 605 {\ 606 code: "/21692532096/usi32_pc_article_01_left",\ 607 sizes: [[300, 250],[336, 280]],\ 608 divId: "div-gpt-ad-1654071122273-0",\ 609 isAps: true\ 610 }\ 611 ];\ 612 window.fluxtag.enableLazyLoad(lines);\ 613 });\ 614 </script>\ 615'); 616 })(); 617 /* 618 document.write('\ 619 <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>\ 620 <!-- pc_usi32_article_01_left -->\ 621 <ins class="adsbygoogle"\ 622 style="display:inline-block;width:336px;height:280px"\ 623 data-ad-client="ca-pub-1344381912509793"\ 624 data-ad-slot="5298021967"></ins>\ 625 <script>\ 626 (adsbygoogle = window.adsbygoogle || []).push({});\ 627 </script>\ 628 '); 629 */ 630 // } 631})(); 632 633$(document).ready(function(){ 634 $('.rparts .article-Category a').each(function(index, element){ 635 var txt = jQuery(element).text(); 636 if(txt.match(/XXXX/) != null){ 637 $(element).remove(); 638 } 639 }); 640 $('.side .category-parent').each(function(index, element){ 641 var txt = jQuery(element).find('a').text(); 642 if(txt.match(/XXXX/) != null){ 643 $(element).remove(); 644 } 645 }); 646 // video.twimg.comã®åç»ã<video>ã¿ã°ã«å¤æ 647 target_elms = document.querySelectorAll('div.t_b'); 648 for (var i = 0; i < target_elms.length; i++) { 649 let target_elm = target_elms[i]; 650 let target_html = target_elm.innerHTML; 651 let replaced_html = target_html.replace(/<a(?:\s+target=\"_blank\")?\s+href=\"(https?\:\/\/video\.twimg\.com\/[^\.]*\.mp4[^\"]*)\"(?:\s+target=\"_blank\"\s*)?>[^<]*<\/a>/g,'<blockquote class="res_quote" style="margin: 0;background-color:#ffffff;color:#111;border:1px dashed #aaa;padding:10px;line-height:1.3;font-size:14px;"><video style="border:1px solid;max-height:480px;max-width:100%;margin-bottom: 16px;" controls="true" muted="muted" src="$1"></video><a href="$1" target="_blank" style="display:block;">$1</a></blockquote>'); 652 if(target_html !== replaced_html){ 653 target_elm.innerHTML = replaced_html; 654 } 655 } 656});
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.