PageSourceSearch

https://www.daniel-moquet.fr/funnel-rdv/public/js/form_project_types.js

js daniel-moquet.fr collected 2026-10-09 22:40:20 UTC 903 bytes, 22 lines download raw bytes

1window.addEventListener('load', e => {
2    const checkboxesNeed = document.querySelectorAll('[data-watch="checkboxNeed"]');
3    const nbNeedChecked = Array.from(document.querySelectorAll('[data-step="1"] input[type="checkbox"]:checked')).length;
4    let checkedNeed = nbNeedChecked;
5
6    function removeRequiredCheckboxesNeed() {
7        Array.from(checkboxesNeed).map(checkb => {
8            (checkedNeed > 0 || nbNeedChecked > 0) ? checkb.removeAttribute('required') : checkb.setAttribute('required', 'true');
9        })
10    }
11
12    for (const checkboxNeed of Array.from(checkboxesNeed)) {
13        checkboxNeed.addEventListener('change', e => {
14            e.preventDefault();
15            checkedNeed = e.currentTarget.checked ? checkedNeed + 1 : checkedNeed - 1;
16            removeRequiredCheckboxesNeed();
17        })
18    }
19    if (nbNeedChecked > 0) {
20        removeRequiredCheckboxesNeed();
21    }
22})

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.