PageSourceSearch

https://www.mgp.fr/modules/internet-templates/javascript/composants/dropdown.js

js mgp.fr collected 2026-10-05 19:07:34 UTC 601 bytes, 12 lines download raw bytes

1export default function Dropdown(elm) {
2    const target = elm.querySelector('.dropdown-toggle').getAttribute('id');
3    const toggleContent = elm.querySelector('[aria-labelledby="' + target + '"]');
4    elm.querySelector('.dropdown-toggle').addEventListener('click', () => {
5        toggleContent.classList.toggle('open');
6        if (toggleContent.classList.contains('open')) {
7            elm.querySelector('.dropdown-toggle').setAttribute('aria-expanded', true);
8        } else {
9            elm.querySelector('.dropdown-toggle').setAttribute('aria-expanded', false);
10        }
11    })
12}

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.