Auto-deploy: 2026-05-17 02:22:51
This commit is contained in:
45
content.js
45
content.js
@@ -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 ───────────────────────────────────────────────────
|
||||||
|
|||||||
Reference in New Issue
Block a user