PageSourceSearch

https://www.jingukaikan.jp/sukeikai/js/totop.js

js jingukaikan.jp collected 2026-09-24 22:18:32 UTC 2,818 bytes, 87 lines download raw bytes

1// directlink |||||||||||||||||||||||||||
2
3var userAgent = navigator.userAgent;
4var UA_iPhone = (userAgent.indexOf('iPhone') > -1)? true:false;
5var UA_iPad = (userAgent.indexOf('iPad') > -1)? true:false;
6$(function() {
7  if(UA_iPhone || UA_iPad) {
8    $('a').bind("mouseover",function(ev) {
9      var link = $(this).attr("href");
10      var target = $(this).attr("target");
11      var linktype = link.substring(0,1);
12      if(linktype != "#") {
13        if(target == "_blank") {
14          window.open(link);
15        } else {
16          location.href = link;
17        }
18      }
19    });
20  }
21});
22
23
24// totop|||||||||||||||||||||||||||||||||
25
26
27$(function() {
28    var topBtn = $('#page-top');    
29    topBtn.hide();
30    //スクロールが100に達したらボタン表示
31    $(window).scroll(function () {
32        if ($(this).scrollTop() > 100) {
33            topBtn.fadeIn();
34        } else {
35            topBtn.fadeOut();
36        }
37    });
38    //スクロールしてトップ
39    topBtn.click(function () {
40        $('body,html').animate({scrollTop: 0}, 650, 'swing');
41        return false;
42    });
43});
44
45$(function () {
46    var userAgent = navigator.userAgent;
47    var UA_iPhone = (userAgent.indexOf('iPhone') > -1) ? true : false;
48    var UA_iPad = (userAgent.indexOf('iPad') > -1) ? true : false;
49    var touched = false;
50    var touch_time = 0;
51        //iPhone,iPadを判定
52    if (UA_iPhone || UA_iPad) {
53        $("#link").bind({
54            'touchstart mousedown': function (e) {
55                touched = true;
56                touch_time = 0;
57                document.interval = setInterval(function () {
58                    touch_time += 100;
59                    // 短すぎるタップとロングタップ時の処理
60                    if (touch_time >= 500 || touch_time < 100) {
61                        e.preventDefault();
62                    }
63                }, 100);
64            },
65            'touchend mouseup mouseout': function (e) { // マウスが領域外に出たかどうか
66                if (touched) {
67                    // ちょうどいいタップ時の処理
68                    if (100 < touch_time < 500) {
69                        var link = $(this).attr("href");
70                        var target = $(this).attr("target");
71                        var linktype = link.substring(0, 1);
72                        if (linktype != "#") {
73                            if (target == "_blank") {
74                                window.open(link);
75                            } else {
76                                location.href = link;
77                            }
78                        }
79                    }
80                }
81                touched = false;
82                clearInterval(document.interval);
83                e.preventDefault();
84            }
85        })
86    };
87});

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.