MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / exportScanReport

Function exportScanReport

web/scripts/ragnar_modern.js:19351–19368  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19349 const checkboxes = form.querySelectorAll('input[type="checkbox"]');
19350 checkboxes.forEach(checkbox => {
19351 config[checkbox.name] = false;
19352 });
19353
19354 // Then get all form values, including checked checkboxes
19355 for (const [key, value] of formData.entries()) {
19356 const input = form.elements[key];
19357 if (input.type === 'checkbox') {
19358 config[key] = input.checked;
19359 } else if (value === 'true' || value === 'false') {
19360 config[key] = value === 'true';
19361 } else if (!isNaN(value) && value !== '') {
19362 config[key] = Number(value);
19363 } else {
19364 config[key] = value;
19365 }
19366 }
19367
19368 // Handle unchecked checkboxes explicitly
19369 checkboxes.forEach(checkbox => {
19370 config[checkbox.name] = checkbox.checked;
19371 });

Callers

nothing calls this directly

Calls 2

addConsoleMessageFunction · 0.70

Tested by

no test coverage detected