Skip to content

Instantly share code, notes, and snippets.

@vladdenisov
Last active May 20, 2020 09:47
Show Gist options
  • Select an option

  • Save vladdenisov/daa8603e56222bc135414bd524cb68d1 to your computer and use it in GitHub Desktop.

Select an option

Save vladdenisov/daa8603e56222bc135414bd524cb68d1 to your computer and use it in GitHub Desktop.
Solving ReshuOge/Ege tests
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))
})
@argraur
Copy link

argraur commented Sep 26, 2018

ur mom gay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment