Auto-deploy: 2026-05-17 02:22:51

This commit is contained in:
Hamza-Ayed
2026-05-17 02:22:51 +03:00
parent e388ccab30
commit dfbb8b4023

View File

@@ -228,34 +228,29 @@
function extractApplicationQuestions() { function extractApplicationQuestions() {
const questions = []; const questions = [];
const formSelectors = [ const modal = document.querySelector('.artdeco-modal, .jobs-easy-apply-modal, #artdeco-modal-outlet');
'.jobs-easy-apply-content', if (!modal) return questions;
'.jobs-easy-apply-form-section__grouping',
'.fb-dash-form-element'
];
for (const sel of formSelectors) { const labels = modal.querySelectorAll('label, legend');
document.querySelectorAll(sel).forEach(section => { const seen = new Set();
// Labels
const labels = section.querySelectorAll('label, legend, .fb-dash-form-element__label');
labels.forEach(label => {
const text = label.textContent.trim();
if (text && text.length > 3 && text.length < 300) {
// Determine input type
const parent = label.closest('.fb-dash-form-element') || section;
let inputType = 'text';
if (parent.querySelector('select')) inputType = 'select';
else if (parent.querySelector('input[type="radio"]')) inputType = 'radio';
else if (parent.querySelector('textarea')) inputType = 'textarea';
else if (parent.querySelector('input[type="checkbox"]')) inputType = 'checkbox';
questions.push({ question: text, type: inputType }); labels.forEach(label => {
} let text = label.textContent.replace(/\*/g, '').replace(/Submit/i, '').trim();
}); if (text && text.length > 5 && text.length < 200 && !seen.has(text)) {
}); seen.add(text);
}
let inputType = 'text';
const parent = label.closest('div') || label.parentElement;
if (parent.querySelector('select')) inputType = 'select';
else if (parent.querySelector('input[type="radio"]')) inputType = 'radio';
else if (parent.querySelector('textarea')) inputType = 'textarea';
else if (parent.querySelector('input[type="checkbox"]')) inputType = 'checkbox';
return questions.slice(0, 15); // Max 15 questions questions.push({ question: text, type: inputType });
}
});
return questions.slice(0, 15);
} }
// ─── Overlay Injection ─────────────────────────────────────────────────── // ─── Overlay Injection ───────────────────────────────────────────────────