Skip to content

Commit 9bdd5ee

Browse files
RajjjAryanCopilot
andcommitted
fix: bring Chrome to foreground with AppleScript + macOS notification
- Use osascript to activate Chrome window (was opening in background) - Show macOS notification with sound to alert user - Increase default timeout to 5 minutes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 13ebd60 commit 9bdd5ee

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

apply-jobs.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ if (resumePath && !existsSync(resumePath)) {
9292
process.exit(1);
9393
}
9494

95-
const timeout = (parseInt(args.timeout) || 180) * 1000;
95+
const timeout = (parseInt(args.timeout) || 300) * 1000;
9696

9797
// ── Collect jobs to apply ──────────────────────────────────────────────
9898
let jobs = []; // [{ boardToken, jobId }]

lib/adapters/greenhouse-browser.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,13 @@ export async function submitViaBrowser({
183183
}
184184

185185
// --- Prompt user ---
186+
// Bring Chrome to foreground on macOS
187+
try {
188+
const { execSync } = await import('child_process');
189+
execSync(`osascript -e 'tell application "Google Chrome" to activate'`);
190+
execSync(`osascript -e 'display notification "Solve CAPTCHA & click Apply" with title "Career Copilot" sound name "Glass"'`);
191+
} catch { /* not macOS or Chrome not found */ }
192+
186193
console.log('\n🔐 Form pre-filled! Please:');
187194
console.log(' 1. Review the answers in the browser');
188195
console.log(' 2. Solve the reCAPTCHA checkbox');

0 commit comments

Comments
 (0)