Skip to content

Instantly share code, notes, and snippets.

@dayAlone
Last active February 8, 2017 01:11
Show Gist options
  • Save dayAlone/c9116fe3b97aa6d8d09b48cae8c366c4 to your computer and use it in GitHub Desktop.
Save dayAlone/c9116fe3b97aa6d8d09b48cae8c366c4 to your computer and use it in GitHub Desktop.
skyeng
['.b-vc-workplace-orderWord__holder'].map(selector =>
$(selector).toArray().map((el, key) => ({
right: $(selector + ':nth-child(' + (key + 1) + ') .b-vc-workplace-orderWord').toArray().map(el => Object.values(JSON.parse(el.getAttribute('drag-and-drop-order').match(/rightOrder:(.*) \}/)[1])).map(el => $$('[data-hash="' + el + '"] span')[1].innerText))[0],
answers: $(selector + ':nth-child(' + (key + 1) + ') .b-vc-workplace-orderWord__item span')
.toArray()
.map(el => el.innerText)
.filter(el => el.length > 0)
})))[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment