Last active
April 11, 2019 18:17
-
-
Save Geczy/c9bbaafb243313078370b7b36622ba28 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sendMessage = ""; | |
setInterval(() => { | |
var textInput = document.querySelector("[name=note]"); | |
if (textInput && !textInput.value) { | |
sendMessage = `Hey ${document | |
.querySelector("div.recruiting-contact span.name") | |
.textContent.replace( | |
/ .*/, | |
"" | |
)}. I'm really looking forward to learning more about ${document | |
.querySelector(".startup-title") | |
.textContent.replace("Apply to", "") | |
.trim()} and offering you my extensive frontend experience..`; | |
textInput.value = sendMessage; | |
} | |
if ( | |
sendMessage && | |
textInput && | |
textInput.value && | |
textInput.value == sendMessage.replace("..", ".") | |
) { | |
var charCount = document.querySelector( | |
".ReactModalPortal .character-count-container" | |
).textContent; | |
if (charCount.indexOf("0/") === -1) { | |
document | |
.querySelector(".ReactModalPortal .c-button.c-button--blue") | |
.click(); | |
} | |
} | |
var closeButton = document.querySelector( | |
".ReactModalPortal .c-button.c-button--blue" | |
); | |
if ( | |
closeButton && | |
closeButton.textContent && | |
closeButton.textContent.trim() === "Close" | |
) { | |
closeButton.click(); | |
var nextListing = Array.prototype.slice | |
.call( | |
document.querySelectorAll( | |
"#startups_content > div.djl87.job_listings.fbs55.browse_startups._a._jm > div.find.g-module.gray.hidden.shadow_no_border.startup-container div[data-name]" | |
) | |
) | |
.filter(function(item, index) { | |
return item.style.display != "none"; | |
}); | |
if (nextListing && nextListing.length) { | |
nextListing[0].click; | |
} | |
} | |
if ( | |
!document.querySelector(".ReactModalPortal") || | |
!document.querySelector(".ReactModalPortal").innerHTML | |
) { | |
var nextListing = Array.prototype.slice | |
.call( | |
document.querySelectorAll( | |
"#startups_content > div.djl87.job_listings.fbs55.browse_startups._a._jm > div.find.g-module.gray.hidden.shadow_no_border.startup-container div[data-name]" | |
) | |
) | |
.filter(function(item, index) { | |
return item.style.display != "none"; | |
}); | |
if (nextListing && nextListing[0]) { | |
var applyNow = nextListing[0].querySelector(".g-button.blue.apply-now-button"); | |
if (applyNow) { | |
applyNow.click(); | |
} | |
} | |
} | |
}, 300); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment