Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- da_people = [];
- da_nodes = document.getElementsByClassName('list_full_desk');
- function httpGetAsync(id, callback) {
- var xmlHttp = new XMLHttpRequest();
- xmlHttp.onreadystatechange = function() {
- if (xmlHttp.readyState == 4 && xmlHttp.status == 200) callback(xmlHttp.responseText);
- };
- xmlHttp.open("GET", 'https://jublia.com/e/WGES2017/backend/TweetPitch.php?id_attendee=' + id, true); // true for asynchronous
- xmlHttp.send(null);
- }
- for(let i = 0; i < da_nodes.length; i++){
- if (da_nodes[i].id) {
- httpGetAsync(da_nodes[i].id, (row) => {
- let json = JSON.parse(row).quoteData,
- location = json.my_preference_matches.find(item => item.attribute == "Location"),
- locationData = location && location.list[0].value,
- person = [json.fullName, json.position, json.companyName, json.companyUrl, locationData];
- console.log(person);
- da_people.push(person.join(';'));
- });
- }
- }
- console.log('Processed rows: ', da_nodes.length);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement