tisaconundrum2 / tamp-script

Tampermonkey script
0 stars 0 forks source link

Approach 2 #2

Open tisaconundrum2 opened 4 years ago

tisaconundrum2 commented 4 years ago

Data will be collected automatically by using the explicit location of the Document Object

What it should look like

document.querySelector("#table11 > tbody > tr:nth-child(1)")
tisaconundrum2 commented 4 years ago
document.querySelector('#tr_fg_fieldGroup_8 > td > table > tbody > tr:nth-child(2) > td > div > span.uir-field.inputreadonly').innerHTML.split('<br>')

The above gives us the name of the Bill To

tisaconundrum2 commented 4 years ago

Get Email Address

email = document.querySelector('#qsTarget_1658836286').innerText
tisaconundrum2 commented 4 years ago

Get IP Address

ip_address = document.querySelector('#tr_fg_fieldGroup_2 > td:nth-child(1) > table > tbody > tr:nth-child(5) > td > div > span.uir-field.inputreadonly').innerText
tisaconundrum2 commented 4 years ago

Get Zipcode

zipcode = document.querySelector('#tr_fg_fieldGroup_8 > td > table > tbody > tr:nth-child(2) > td > div > span.uir-field.inputreadonly').innerHTML.split('<br>')[2].replace(/^\s*/g,'').match(/\d+/)[0]
tisaconundrum2 commented 4 years ago

Get Name

Name = document.querySelector('#tr_fg_fieldGroup_8 > td > table > tbody > tr:nth-child(2) > td > div > span.uir-field.inputreadonly').innerHTML.split('<br>')[0].replace(/^\s*/g,'')
tisaconundrum2 commented 4 years ago

Get Country


Country = document.querySelector('#tr_fg_fieldGroup_8 > td > table > tbody > tr:nth-child(2) > td > div > span.uir-field.inputreadonly').innerHTML.split('<br>')[3]
tisaconundrum2 commented 4 years ago

Get State


State = document.querySelector('#tr_fg_fieldGroup_8 > td > table > tbody > tr:nth-child(2) > td > div > span.uir-field.inputreadonly').innerHTML.split('<br>')[2].match(/[A-Z]{2}/)[0]
tisaconundrum2 commented 4 years ago

Add Verify Button

document.querySelector("#main_form > table > tbody > tr:nth-child(1) > td > div.uir-page-title > div.uir-page-title-firstline > span").innerHTML += "<button type=\"button\">Verify with Emailage</button>"