forked from davidwarshawsky/Easy-Apply-Automater
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIdentifyPages.js
40 lines (36 loc) · 1.34 KB
/
IdentifyPages.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// function isResumeUploadPage() {
// const labels = document.querySelectorAll('label[for]');
// for (const label of labels) {
// const spanButton = label.querySelector('span[role="button"]');
// if (spanButton && spanButton.textContent.trim() === 'Upload resume') {
// return true; // Found the label with the specified content
// }
// }
// return false; // Did not find the label with the specified content
// }
// // Example usage
// if (isResumeUploadPage()) {
// console.log('This is a resume upload page.');
// } else {
// console.log('This is not a resume upload page.');
// }
export function isSentPage(){
var h2Element = document.querySelector('h2#post-apply-modal');
if (h2Element) {
var spanElement = document.querySelector('button span.artdeco-button__text');
if (spanElement.textContent.trim() === 'Done') {
return true;
}
}
return false;
}
// add a function to check or uncheck radio button
// input[data-test-text-selectable-option__input="Yes"]').checked = true;
// function checkRadioButton(radioSelector) {
// var radio = document.querySelector(radioSelector);
// if (radio) {
// radio.checked = true;
// } else {
// console.log(`Radio '${radioSelector}' not found`);
// }
// }