PageSourceSearch

https://cryptochallenges-5b6015357b45.herokuapp.com/assets/control…15d62d98429fb2b4189908535a912e800971372b.js

js cryptochallenges-5b6015357b45.herokuapp.com collected 2026-10-03 14:48:26 UTC 1,516 bytes, 43 lines download raw bytes

1import { Controller } from "@hotwired/stimulus"
2
3// Connects to data-controller="cookies"
4export default class extends Controller {
5  static targets = ["necessary", "performance", "functional" ]
6
7  connect() {
8
9  }
10
11  selectnecessary(event) {
12    event.preventDefault()
13
14    const necessary_cookies = this.necessaryTarget
15    necessary_cookies.checked = true
16
17    const performance_cookies = this.performanceTarget
18    performance_cookies.checked = false
19
20    const functional_cookies = this.functionalTarget
21    functional_cookies.checked = false
22  }
23
24  acceptselected(event) {
25    const form = document.getElementById('form-accept-cookie').parentNode
26
27    // Idempotence : retire les champs injectés lors d'un clic précédent.
28    form.querySelectorAll('input[data-cookie-injected]').forEach((input) => input.remove())
29
30    // Le toggle "nécessaire" est verrouillé (disabled + checked) : toujours true.
31    const necessary = true
32    const performance = this.performanceTarget.checked
33    const functional = this.functionalTarget.checked
34
35    form.insertAdjacentHTML('beforeend',
36                            `
37                            <input type="hidden" name="necessary_cookies" value="${necessary}" data-cookie-injected>
38                            <input type="hidden" name="performance_cookies" value="${performance}" data-cookie-injected>
39                            <input type="hidden" name="functional_cookies" value="${functional}" data-cookie-injected>
40                            `
41    )
42  }
43};

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.