// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://www.lazada.com.my/helpcenter/
// @grant none
// ==/UserScript==
var getJSON = function(url) {
return new Promise(function(resolve, reject) {
var xhr = new XMLHttpRequest();
xhr.open('get', url, true);
xhr.responseType = 'json';
xhr.onload = function() {
var status = xhr.status;
if (status == 200) {
resolve(xhr.response);
} else {
reject(status);
}
};
xhr.send();
});
};
setInterval(function() {
$.getJSON('http://www.lazada.com.my/ajax/lottery/spinTheWheel/?lang=en&platform=desktop&wheelToken=1e48eefec55aba8b941095da02508bbf&dpr=desktop', function(data){
if(data != undefined) {
if(data.data.voucherCode) {
console.log('Voucher: ' + data.data.voucherCode);
alert('Voucher: ' + data.data.voucherCode);
}
else {
console.log('Please wait...');
}
}
}
); }, 1000);
I get an error on this part. When I click on the exclamation mark it tells me to put "data !==" instead. Is that correct?
Lazada Discussion V22 | #MYCyberSCAM, lalalaxx.com | pricecampers.com
Oct 3 2017, 11:15 PM
Quote
0.0199sec
0.57
7 queries
GZIP Disabled