PageSourceSearch

https://www.tokyodome-hotels.co.jp/assets/hotel/scripts/footer/daytimeImageChange.js

js tokyodome-hotels.co.jp collected 2026-10-01 14:07:47 UTC 969 bytes, 32 lines download raw bytes

1/**
2 * ページロード時間によって画像を切り替える
3 */
4document.addEventListener('DOMContentLoaded', () => {
5    const root = document.querySelector('.js-change-image');
6    const visibleClass = 'is-visible';
7    if (!root) {
8        return;
9    }
10    const items = root.querySelectorAll('.fn-change-item');
11    const nowHours = new Date().getHours();
12    items.forEach((item) => {
13        item.classList.remove(visibleClass);
14        const itemTime = item.dataset.itemTime;
15        if (3 <= nowHours && nowHours < 9) {
16            if (itemTime === 'morning') {
17                item.classList.add(visibleClass);
18            }
19        }
20        else if (9 <= nowHours && nowHours < 18) {
21            if (itemTime === 'noon') {
22                item.classList.add(visibleClass);
23            }
24        }
25        else {
26            if (itemTime === 'night') {
27                item.classList.add(visibleClass);
28            }
29        }
30    });
31});
32export {};

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.