PageSourceSearch

https://cmp.netatopi.jp/ipc_show_cookie_banner.js

js netatopi.jp collected 2026-10-02 07:29:25 UTC 3,319 bytes, 44 lines download raw bytes

1(function(d, html){
2 window._ipc_cookie_confirmed = function() {
3  var d = document, dom = d.location.hostname, idx = 0, s = d.createElement('SCRIPT');
4  if (dom.indexOf('.co.jp') >= 0) {
5   idx = dom.lastIndexOf('.', dom.indexOf('.co.jp') - 1);
6  } else {
7   idx = dom.lastIndexOf('.', dom.lastIndexOf('.') - 1);
8  }
9  dom = dom.substring(idx);
10  if (dom.indexOf('.') !== 0) dom = '.' + dom;
11  console.log(dom);
12  if (window.localStorage) {
13   localStorage.setItem('ipc_cookie', 'confirmed');
14  }
15  d.cookie = 'ipc_cookie=confirmed;path=/;domain=' + dom + ';max-age=31536000;secure;samesite=strict';
16  if (d.getElementById('ipc_cookie_confirmation')) d.getElementById('ipc_cookie_confirmation').style.display = 'none';
17  s.src = location.protocol + '//cmp' + dom + '/ipc_cookie_confirmed.js';
18  s.async = "async";
19  d.head.appendChild(s);
20 };
21 var _c = d.cookie, _popup = function(d, html) {
22  var p = d.createElement('ASIDE');
23  p.id = 'ipc_cookie_confirmation';
24  p.innerHTML = html;
25  d.body.appendChild(p);
26 };
27 if (_c.indexOf('ipc_cookie') >= 0) return window._ipc_cookie_confirmed();
28 if (window.localStorage && localStorage.getItem('ipc_cookie')) return window._ipc_cookie_confirmed();
29 if (d.readyState === 'loading') {
30  d.addEventListener('DOMContentLoaded', function(event) { _popup(d, html); });
31 } else {
32  _popup(d, html);
33 }
34})(document, 
35 '<style>#ipc_cookie_confirmation a { text-decoration: underline; color: #fff; transition: color .3s; } #ipc_cookie_confirmation a:hover { text-decoration: none; color: #4cd3cc; } #ipc_cookie_confirmation .cookie_confirmed_and_close:hover { background-color: #89c !important; !important; color: #fff !important; } @media (min-width: 640px) { .ipc_cookie_inner { display: flex !important; justify-content: center; } .ipc_cookie_button_wrapper { margin: 0 0 0 10px !important; } .cookie_confirmed_and_close { width: auto !important; padding: 30px !important; } }</style>' + 
36 '<div style="display: block; position: fixed; bottom: 0; width: 100%; padding: 30px 20px; background: #666; color: #fff; box-sizing: border-box; z-index: 32000;">' + 
37  '<div class="ipc_cookie_inner" style="font-size: 12px; font-weight: 100; font-family: Meiryo,Helvetica,Arial,sans-serif;">' + 
38   '<p style="font-size: 14px; font-weight: 500; line-height: 1.65; margin: 0; padding: 0;">当サイトでは、サービス向上、アクセス状況計測、広告配信などのためにクッキーを使用しています。詳しくは「<a href="https://www.impress.co.jp/privacy.html" target="_blank">プライバシーポリシー</a>」をご覧ください。オプトアウトもそちらから可能です。</p>' + 
39   '<div class="ipc_cookie_button_wrapper" style="display: flex; justify-content: flex-end; margin-top: 10px;">' + 
40    '<button class="cookie_confirmed_and_close" style="display: inline-flex; align-items: center; justify-content: center; height: 40px; width: 100%; padding: 0 12px; font-size: 14px; line-height: 1.65; text-decoration: none; vertical-align: bottom; white-space: nowrap; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 0; background-color: #139; color: #fff; font-weight: 700;" onclick="_ipc_cookie_confirmed();">閉じる</button>' + 
41   '</div>' + 
42  '</div>' + 
43 '</div>'
44);

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.