Skip to content

Instantly share code, notes, and snippets.

@Geczy

Geczy/ez.js

Last active Apr 11, 2019
Embed
What would you like to do?
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