Last active
May 20, 2020 09:47
-
-
Save vladdenisov/daa8603e56222bc135414bd524cb68d1 to your computer and use it in GitHub Desktop.
Solving ReshuOge/Ege tests
This file contains hidden or 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
| inps = document.getElementsByClassName('test_inp') | |
| Array.from(document.getElementsByClassName('prob_nums')).map((e, i) => { | |
| $.get('/problem?id=' + e.children[0].innerHTML).then(html => { | |
| const answer_txt = $(html).find('.answer')[0].innerText | |
| if (answer_txt.indexOf('|') !== -1) inps[i + 5].value = answer_txt.slice(7, answer_txt.indexOf('|')) | |
| else inps[i + 5].value = answer_txt.slice(7) | |
| }, (e) => console.error(e)) | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ur mom gay