PageSourceSearch

https://www.fg-detection.com/res/formFocus.js?v=2

js fg-detection.com collected 2026-09-25 08:10:58 UTC 1,452 bytes, 41 lines download raw bytes

1window.addEventListener("DOMContentLoaded", () => {
2    const scopedForms = document.querySelectorAll('.c2form_zero form');
3
4    scopedForms.forEach(form => {
5      const inputs = form.querySelectorAll('.c2form_input input, .c2form_input textarea');
6
7      inputs.forEach(input => {
8        const row = input.closest('.c2form_row');
9        if (!row) return;
10
11        // Add row type class once at load
12        if (input.tagName === 'TEXTAREA') {
13          row.classList.add('textarea-row');
14		  let textareaLabel = row.querySelector("label")
15		  row.querySelector("textarea").setAttribute("placeholder", textareaLabel.textContent)
16        } else if (input.type === 'checkbox') {
17          row.classList.add('checkbox-row');
18        }
19
20        const handleInputChange = () => {
21          let hasValue = false;
22
23          if (input.type === 'checkbox') {
24            // Check any checkbox in the same .c2form_input
25            const checkboxContainer = input.closest('.c2form_input');
26            const checkboxes = checkboxContainer.querySelectorAll('input[type="checkbox"]');
27            hasValue = Array.from(checkboxes).some(cb => cb.checked);
28          } else {
29            hasValue = input.value.trim() !== '';
30          }
31
32          row.classList.toggle('focus', hasValue);
33        };
34
35        const eventType = input.type === 'checkbox' ? 'change' : 'input';
36        input.addEventListener(eventType, handleInputChange);
37      });
38    });
39	
40	
41})

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.