Last active
May 2, 2016 12:16
-
-
Save komkanit/8c5d4b6bf467140f247589f7bf5e6a4a to your computer and use it in GitHub Desktop.
hack how you know your friend
This file contains 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
//version1 show process | |
var i=0; | |
setInterval(function(){ | |
var ansBox = $('.my_answers_block')[i] | |
var len = $(ansBox).children().length | |
for(var j = 0 ; j < len ; j++){ | |
var b = $(ansBox).children()[j]; | |
var str = b.getAttribute('onclick') | |
var arr = str.replace('(',' ').replace(')',' ').replace(',',' ').split(/,| /) | |
var r = arr[3] | |
var r_good = arr[7] | |
var q_real = arr[5] | |
if(r === r_good){ | |
AnswerQuestion(i+1, r, q_real, r_good) | |
break | |
} | |
} | |
i++; | |
},2000) | |
//version2 not show process | |
list_data = "" | |
for(var i=0 ; i < 15 ; i++){ | |
var ansBox = $('.my_answers_block')[i] | |
var len = $(ansBox).children().length | |
for(var j = 0 ; j < len ; j++){ | |
var b = $(ansBox).children()[j]; | |
var str = b.getAttribute('onclick') | |
var arr = str.replace('(',' ').replace(')',' ').replace(',',' ').split(/,| /) | |
var r = arr[3] | |
var r_good = arr[7] | |
var q_real = arr[5] | |
if(r === r_good){ | |
list_data = list_data+q_real+","+r+"|" | |
if(i == 14){ | |
var w = document.URL | |
var id = w.split('/')[4] | |
var url = '/go/1096442923751361/588?r='+id+'&data='+list_data; | |
document.location.href = url | |
} | |
break | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment