Skip to content

Instantly share code, notes, and snippets.

@komkanit
Created May 5, 2016 16:18
Show Gist options
  • Select an option

  • Save komkanit/c660860732cddbdeb2ab9ce517fc3d6c to your computer and use it in GitHub Desktop.

Select an option

Save komkanit/c660860732cddbdeb2ab9ce517fc3d6c to your computer and use it in GitHub Desktop.
var ans = [
'(23)',
'(24)',
'(3)',
'(35)',
'(36)',
'(48)',
'(6)',
'(68)',
'(69)',
'(7)',
'(71)',
'(72)',
'(73)',
'(76)',
'(8)',
'(9)',
'(15)',
'(17)',
'(22)',
'(28)',
'(33)',
'(40)',
'(44)',
'(45)',
'(63)']
var images = document.getElementsByClassName('stage')[0].children
setInterval(function () {
Array.from(images).forEach(function (image) {
var pic = image.getAttribute('src')
var arr = pic.replace('.', ' ').split(' ')
ans.reduce(function (acc, item) {
if (item === arr[1]) {
acc = image
image.click(true)
}
return acc
}, [])
})
}, 300)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment