Skip to content

Instantly share code, notes, and snippets.

@nnnlog
Last active May 1, 2020 02:38
Show Gist options
  • Save nnnlog/26f6772d45b44cc8b9f39b9dc157e6c4 to your computer and use it in GitHub Desktop.
Save nnnlog/26f6772d45b44cc8b9f39b9dc157e6c4 to your computer and use it in GitHub Desktop.
classcard-english
let wait = async() => {
return new Promise(r => setTimeout(() => r(), 3000));
};
(async () => {
while(parseInt(document.querySelector(".unknown_count").innerText)) {
await wait();
document.querySelectorAll(".card-quest-item.cc-table.middle.fill-parent-w.back-quest.answer")[parseInt(document.querySelector(".known_count").innerText)].click();
}})();
let wait = async() => {
return new Promise(r => setTimeout(() => r(), 3000));
};
while(parseInt(document.querySelector(".unknown_count").innerText)) {
document.querySelectorAll("input.form-control.input-lg.input-answer.m-center.w-90p")[(parseInt(document.querySelector(".known_count").innerText)) * 2 + 1].value = slider.find('.CardItem.current').find('.card-bottom .spell-answer .spell-content').text().trim();
document.querySelector("a.btn.btn-xl.btn-primary.shadow.w-250.btn-confirm").click()
await wait();
}
let wait = async(s) => {
return new Promise(r => setTimeout(() => r(), 1000 * s));
};
while(parseInt(document.querySelector(".unknown_count").innerText)) {
document.getElementById("wrapper-learn").click();
await wait(1.5);
document.querySelector("a.btn.btn-xl.btn-success.shadow.w-250.btn-short-change-card").click();
await wait(2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment