Skip to content

Instantly share code, notes, and snippets.

@ig10
Last active August 29, 2015 14:16
Show Gist options
  • Save ig10/b2a99433902e387a15cc to your computer and use it in GitHub Desktop.
Save ig10/b2a99433902e387a15cc to your computer and use it in GitHub Desktop.
Auto Fill Kompass 2015 Apply Forms
javascript:((function registerKompass() {
var step1 = {
radio: ["rdoServiceIn_0"],
common: {
"txtLastName": 'PASSPORT LAST NAME',
"txtFirstName": 'PASSPORT FIRST NAME',
"txtDob": 'yyyy-mm-dd',
"ddlCitizenship": 'COUNTRY', // CL == Chile
"txtEmailAddress": 'YOUR.EMAIL@gmail.com',
"txtEmailAddressConfirm": 'YOUR.EMAIL@gmail.com',
"txtPassword1": 'YourComplexPassword!2015',
"txtPassword2": 'YourComplexPassword!2015'
}
}
var step2 = {
common: {
"ddlSecretQuestion": '3', //Favorite Travel Place
"txtYourAnswer": 'Canada',
"txtConfirmAnswer1": 'Canada',
"ddlSecretQuestion2": '11', //Graduate High School Year
"txtYourAnswer2": 'YEAR', // i.e 2015
"txtConfirmAnswer2": 'YEAR',
"ddlSecretQuestion3": '20', // Mother's maiden name
"txtYourAnswer3": "My Mom's Name",
"txtConfirmAnswer3": "My Mom's Name"
},
checkbox: ['chkPrivacy']
}
var selected = ( document.getElementById('stepOnePanel') === null ? step2 : step1 );
var keys = Object.keys(selected);
for ( var i = 0; i < keys.length; i++ ) {
if ( keys[i] === 'common' ) {
var fields = Object.keys(selected[keys[i]]);
for ( var j = 0; j < fields.length; j++ ) {
document.getElementById(fields[j]).value = selected[keys[i]][fields[j]];
}
} else {
var fields = selected[keys[i]];
for ( var j = 0; j < fields.length; j++ ) {
document.getElementById(fields[j]).click();
}
}
}
// Note: Password format
// Your password must contain a minimum of 8 and a maximum of 12 characters.
// Passwords are case sensitive and must start with a // letter.
// You must ensure that your password contains all of the following:
// At least one uppercase letter from A to Z
// At least one lowercase letter from a to z
// At least one number from 0 to 9
// At least one of the following characters: ! @ # $ % ? & * ( ) ^.
}).call());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment