PageSourceSearch

https://www.infoseek.co.jp/pc/js/utilbox-1.4.js

js infoseek.co.jp collected 2026-09-24 08:29:40 UTC 3,185 bytes, 94 lines download raw bytes

1$(document).ready(function () {
2
3    var slideSpeed = 'fast';
4
5    /* ---------------------------
6     今日の天気・今日の運勢
7     ---------------------------*/
8    $('#utilBox .toggle .button').on('click', function () {
9        var slide = $(this).parent().nextAll('.listArea');
10        var button = $(this).parent().parent().children('.toggle').children('.button');
11        if (slide.css('display') == 'none') {
12            slide.slideDown(slideSpeed);
13            button.addClass('open');
14        }
15    });
16
17    function getClickTarget(selector, e) {
18        var container = selector;
19
20        if (!container.is(e.target) && container.has(e.target).length === 0) {
21            return true;
22        }
23        return false;
24    }
25
26    window.setWeatherArea = function setWeatherArea(areaId) {
27        let d = new Date();
28        d.setTime(d.getTime() + (365 * 24 * 60 * 60 * 1000));
29        if (location.protocol === 'https:') {
30            document.cookie = 'TOP_WEATHER_AREA=' + areaId + ';expires=' + d.toUTCString() + ';path=/' + ';secure';
31        } else {
32            document.cookie = 'TOP_WEATHER_AREA=' + areaId + ';expires=' + d.toUTCString() + ';path=/';
33        }
34        // Update browser history in case of selection process after toast display.
35        let param = location.search.substring(1);
36        if (param === 'lgos' || param === 'lgif' || param === 'lgof') {
37            history.replaceState(null, null, location.pathname);
38        }
39        // Redraw the screen at the same time as selection.
40        location.reload();
41    };
42
43    // マウスが要素の上にある状態でマウスキーが離された際にイベント
44    $(document).mouseup(function (e) {
45        var weather = $('#utilBox .weather .listArea');
46        var weatherbutton = $('#utilBox .weather .button');
47
48        if (getClickTarget(weather, e)) {
49            weather.slideUp(slideSpeed);
50            weatherbutton.removeClass('open');
51        }
52    });
53
54    /* ---------------------------
55     地域選択
56     ---------------------------*/
57    //1階層目
58    $('#utilBox .weather .listArea > ul > li > a').on('click', function () {
59        var li = $(this).parent('li');
60        var ul = li.children('ul');
61
62        $('#utilBox .weather .listArea > ul li').removeClass('open');
63        li.addClass('open');
64
65        if (ul.css('display') == 'none') {
66            ul.slideDown(slideSpeed);
67        } else {
68            ul.slideUp(slideSpeed);
69        }
70
71        $('#utilBox .weather .listArea > ul > li').each(function () {
72            if (!$(this).hasClass('open')) {
73                $(this).children('ul').slideUp(slideSpeed);
74            }
75        });
76    });
77
78    //2階層目以下
79    $('#utilBox .weather .listArea > ul > li li > a').on('click', function () {
80        var li = $(this).parent('li');
81        var ul = li.children('ul');
82
83        if (ul.length > 0) {
84            li.prevAll('li').children('ul').slideUp();
85            li.nextAll('li').children('ul').slideUp();
86
87            if (ul.css('display') == 'none') {
88                ul.slideDown(slideSpeed);
89            } else {
90                ul.slideUp(slideSpeed);
91            }
92        }
93    });
94});

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.