Onionr/static-data/www/onboarding/onboarding.js

26 lines
863 B
JavaScript
Raw Normal View History

2019-10-11 09:28:43 +00:00
fetch('/getnewkeys', {
headers: {
"token": webpass
}})
.then((resp) => resp.text()) // Transform the data into text
.then(function(resp) {
2019-10-17 10:00:24 +00:00
keys = resp.split('')
})
function getCheckValue(elName){
return document.getElementsByName(elName)[0].checked
}
document.getElementById('onboardingForm').onsubmit = function(e){
submitInfo = {}
submitInfo.massSurveil = getCheckValue('state')
submitInfo.stateTarget = getCheckValue('stateTarget')
submitInfo.localThreat = getCheckValue('local')
submitInfo.networkContrib = getCheckValue('networkContribution')
submitInfo.plainContrib = getCheckValue('networkContributionPlain')
submitInfo.donate = getCheckValue('donate')
submitInfo.deterministic = getCheckValue('useDeterministic')
submitInfo.mail = getCheckValue('useMail')
e.preventDefault()
}