PageSourceSearch

https://xgm.guru/public/mjs/79df25d1/components/menu-slider.js

js xgm.guru collected 2026-09-24 10:34:08 UTC 921 bytes, 26 lines download raw bytes

1import {Spoiler} from '../ui/spoiler.js'
2import {Cookie} from '../ui/cookie.js'
3
4addEventListener('click', e => {
5    const button = e.target.closest('.slide_button')
6    if (!button) return
7    const key = button.dataset.menuSlideKey
8    if (!key) return
9    const status = button.dataset.menuSlideStatus === 'open' ? 'closed' : 'open'
10    button.dataset.menuSlideStatus = status
11
12    document.querySelectorAll(`.slide-button-${key}`).forEach(element => {
13        element.classList.remove('fa-chevron-down', 'fa-chevron-up')
14        element.classList.add(status === 'closed' ? 'fa-chevron-down' : 'fa-chevron-up')
15    })
16
17    document.querySelectorAll(`.group-${key}`).forEach(g => Spoiler.toggle(g))
18
19    if (button.dataset.menuSlideInitial) {
20        if (status === 'open') {
21            Cookie.removeItem(`menucat-${key}`)
22        } else {
23            Cookie.setItem(`menucat-${key}`, status, 365)
24        }
25    }
26})

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.