· 8 years ago · Jan 11, 2018, 12:18 PM
1var time = 10000; //Tiempo en ms. No se aconseja menos si no quieres comerte un ban
2var domain = "gmail.com"; //Puedes cambiarlo por gmail, hotmail.. o mejor dejarlo como esta
3
4
5//SI NO ENTIENDES NI PAPA, ATRAS!!!!!
6function telewin() {
7var e = {
8email: function () {
9function e() {
10return Math.floor(65536 * (1 + Math.random())).toString(16).substring(1)
11}
12if(domain=="gmail.com"){
13var sep="0";
14}else{
15var sep = "-";
16}
17
18return e() + e()
19
20}() + "@"+domain,
21receive_offert: !1
22},
23t = !1;
24t || (t = !0, $.ajax({
25type: "POST",
26url: "https://d6ow8diqzony0.cloudfront.net/check-mail",
27dataType: "json",
28contentType: "application/json",
29crossDomain: !0,
30data: JSON.stringify(e),
31success: function(s) {
32if (!(t = !1)) {
33var a = JSON.stringify(JSON.parse(s.body)),
34n = JSON.parse(a);
35if (!t) switch (n.responseMessage) {
36case "EMAIL_SAVED":
37$.ajax({
38type: "POST",
39url: "https://d6ow8diqzony0.cloudfront.net/check-prize",
40dataType: "json",
41contentType: "application/json",
42crossDomain: !0,
43data: JSON.stringify({
44email: e.email
45}),
46success: function(s) {
47t = !1, timeOutId = setTimeout(telewin, time);
48var a = JSON.stringify(JSON.parse(s.body));
49switch (JSON.parse(a).responseMessage) {
50case "USER_IS_WINNER":
51console.warn("[GANADOR]" + e.email);
52break;
53case "USER_NOT_WIN":
54console.log("[NO GANADOR]" + e.email)
55}
56},
57error: function(e) {
58t = !1, console.log("ERROR: " + e.message)
59}
60})
61}
62}
63},
64error: function(e) {
65t = !1, console.log("ERROR: " + e.message)
66}
67}))
68}
69
70function telequeda() {
71$.ajax({
72url: "./data.json",
73dataType: "text",
74success: function(e) {
75timeOutId2 = setTimeout(telequeda, 6e4);
76var t = JSON.parse(e);
77prizesEnable = JSON.stringify(t.prizesEnable), console.log("[INFO] Quedan " + prizesEnable + " Pizzas")
78}
79})
80}
81var timeOutId = 0,
82timeOutId2 = 0;
83telewin(), telequeda(), timeOutId = setTimeout(telewin, time), timeOutId2 = setTimeout(telequeda, 6e4);