PageSourceSearch

https://www.pcwrap.com/assets/common/js/main.js?1790985558

js pcwrap.com collected 2026-10-02 23:59:33 UTC 1,632 bytes, 45 lines download raw bytes

1$(function () {
2
3    /*
4     * ページ上部に戻る
5     */
6    var pagetop = $('#page_top');
7    // ボタン非表示
8    pagetop.hide();
9    // 100px スクロールしたらボタン表示
10    $(window).scroll(function () {
11        if ($(this).scrollTop() > 100) {
12            pagetop.fadeIn();
13        } else {
14            pagetop.fadeOut();
15        }
16    });
17    pagetop.click(function () {
18        $('body, html').animate({scrollTop: 0}, 100);
19        return false;
20    });
21
22    /*
23     * 広告クリックID(gclid/yclid/fbclid/msclkid/twclid)の取得・保存
24     * URLに付いていれば「パラメータ名=値」の形でlocalStorageに保存(新しいIDが来たら上書き)。
25     * 保持期間は90日。90日を過ぎた保存値は破棄する。
26     */
27    var clidKeys = ['gclid', 'yclid', 'fbclid', 'msclkid', 'twclid'];
28    var clidParams = new URLSearchParams(location.search);
29    for (var i = 0; i < clidKeys.length; i++) {
30        var clidValue = clidParams.get(clidKeys[i]);
31        if (clidValue) {
32            // 「gclid=xxxx」の形と取得時刻を保存(新しいIDが来たら上書き)
33            localStorage.setItem('clid', clidKeys[i] + '=' + clidValue);
34            localStorage.setItem('clid_time', String(Date.now()));
35            break;
36        }
37    }
38    // 90日を過ぎていたら破棄
39    var clidLimit = 90 * 24 * 60 * 60 * 1000;
40    var clidTime = parseInt(localStorage.getItem('clid_time'), 10);
41    if (clidTime && (Date.now() - clidTime) > clidLimit) {
42        localStorage.removeItem('clid');
43        localStorage.removeItem('clid_time');
44    }
45});

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.