PageSourceSearch

https://www.sechigara.net/js/smartphone_v-20131007.js

js sechigara.net collected 2026-10-06 15:06:16 UTC 2,035 bytes, 62 lines download raw bytes

1(function () {
2  if (!navigator.userAgent.match(/(?:iPhone|iPod|Android)/) || (location.hash === '#no_banner')) {
3    return;
4  }
5
6  if (window.addEventListener) {
7    window.addEventListener('load', function() {
8      var sphd = document.createElement('div');
9      sphd.id = 'smartphone';
10      sphd.innerHTML = ['<style type="text/css">',
11        '#smartphone {',
12        '  background-color: #edeff2;',
13        '  padding: 18px;',
14        '  position: relative;',
15        '  bottom: 0;',
16        '  left: 0;',
17        '  width: 100%;',
18        '  -webkit-box-sizing: border-box;',
19        '  box-sizing: border-box;',
20        '  z-index: 2147483647;',
21        '}',
22        '.smartphonelink {',
23        '  display: block;',
24        '  font-size: 18px;',
25        '  padding: 2vh;',
26        '  color: #fff !important;',
27        '  text-decoration: none !important;',
28        '  font-weight: bold;',
29        '  text-decoration: none;',
30        '  text-align: center;',
31        '  background: #647088;',
32        '  border-radius: 6px;',
33        '}',
34        '</style>',
35        ('<a href="javascript:void(0)" class="smartphonelink" id="blog-change-sp">'
36          + unescape('%u30B9%u30DE%u30FC%u30C8%u30D5%u30A9%u30F3%u7248%u3078')
37          + '</a>')
38      ].join('\n');
39
40      document.body.appendChild(sphd);
41      var elm = document.getElementById("blog-change-sp");
42      if (elm) {
43        elm.addEventListener('click', function() {
44          var domain, path;
45          var blog_url = ld_blog_vars.url;
46          if (blog_url.match(/^http:\/\/([^\/]+)(\/[^\/]+)\/$/)) {
47            domain = RegExp.$1;
48            path   = RegExp.$2;
49          } else if (blog_url.match(/^http:\/\/([^\/]+)\/$/)) {
50            domain = RegExp.$1;
51            path   = '/';
52          } else {
53            return;
54          }
55            var cookie = 'sp_friendly=1; domain=' + RegExp.$1 + '; path=' + path + ';';
56            document.cookie = cookie;
57            document.location.reload(true);
58        }, false);
59      }
60    }, false);
61  }
62})();

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.