Skip to content

Commit

Permalink
개발: OneAccessCX의 input값 암호화모듈 대응
Browse files Browse the repository at this point in the history
  • Loading branch information
ParkJeongseop committed Apr 24, 2023
1 parent af48a56 commit c268660
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions autofill.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ function is_MVNO(carrier_code) {
return !is_MNO(carrier_code);
}

function trigger_input_event(element) {
element.dispatchEvent(new Event('input', {bubbles:true}));
}

function trigger_change_event(element) {
element.dispatchEvent(new Event('change', {bubbles:true}));
}

window.onload = function () {
this.console.log('Auth Autofill (본인인증 자동완성)\n한국 휴대전화 본인인증 서비스 자동완성 브라우저 확장 프로그램');

Expand Down Expand Up @@ -510,15 +518,19 @@ window.onload = function () {

if(nameInput) {
nameInput.value = profilesOb[spI].name;
trigger_input_event(nameInput);
}
if(birthDateInput) {
birthDateInput.value = profilesOb[spI].birth;
trigger_input_event(birthDateInput);
}
if(phone1Input) {
phone1Input.value = profilesOb[spI].phone_number.substr(0, 3);
trigger_change_event(phone1Input);
}
if(phone2Input) {
phone2Input.value = profilesOb[spI].phone_number.substr(3, 8);
trigger_input_event(phone2Input);
}
if(carrierInput) {
if (profilesOb[spI].carrier == carrier.SKT || profilesOb[spI].carrier == carrier.SKT_MVNO) {
Expand All @@ -528,6 +540,7 @@ window.onload = function () {
} else if (profilesOb[spI].carrier == carrier.LGU || profilesOb[spI].carrier == carrier.LGU_MVNO) {
carrierInput.value = 'L';
}
trigger_change_event(carrierInput);
}
if(agreeInput && !agreeInput.checked) {
agreeInput.click();
Expand All @@ -548,15 +561,19 @@ window.onload = function () {

if(nameInput) {
nameInput.value = profilesOb[spI].name;
trigger_input_event(nameInput);
}
if(birthDateInput) {
birthDateInput.value = profilesOb[spI].birth.substr(2, 6);
trigger_input_event(birthDateInput);
}
if(phone1Input) {
phone1Input.value = profilesOb[spI].phone_number.substr(0, 3);
trigger_change_event(phone1Input);
}
if(phone2Input) {
phone2Input.value = profilesOb[spI].phone_number.substr(3, 8);
trigger_input_event(phone2Input);
}
if(carrierInput) {
if (profilesOb[spI].carrier == carrier.SKT || profilesOb[spI].carrier == carrier.SKT_MVNO) {
Expand All @@ -566,6 +583,7 @@ window.onload = function () {
} else if (profilesOb[spI].carrier == carrier.LGU || profilesOb[spI].carrier == carrier.LGU_MVNO) {
carrierInput.value = 'L';
}
trigger_change_event(carrierInput);
}
if(agreeInput && !agreeInput.checked) {
agreeInput.click();
Expand All @@ -586,9 +604,11 @@ window.onload = function () {

if(phone1Input) {
phone1Input.value = profilesOb[spI].phone_number.substr(0, 3);
trigger_change_event(phone1Input);
}
if(phone2Input) {
phone2Input.value = profilesOb[spI].phone_number.substr(3, 8);
trigger_input_event(phone2Input);
}
if(carrierInput) {
if (profilesOb[spI].carrier == carrier.SKT || profilesOb[spI].carrier == carrier.SKT_MVNO) {
Expand All @@ -598,6 +618,7 @@ window.onload = function () {
} else if (profilesOb[spI].carrier == carrier.LGU || profilesOb[spI].carrier == carrier.LGU_MVNO) {
carrierInput.value = 'L';
}
trigger_change_event(carrierInput);
}
if(agreeInput && !agreeInput.checked) {
agreeInput.click();
Expand All @@ -620,21 +641,27 @@ window.onload = function () {

if(nameInput) {
nameInput.value = profilesOb[spI].name;
trigger_input_event(nameInput);
}
if(birthDateInput) {
birthDateInput.value = profilesOb[spI].birth.substr(2, 6);
trigger_input_event(birthDateInput);
}
if(phone1Input) {
phone1Input.value = profilesOb[spI].phone_number.substr(0, 3);
trigger_change_event(phone1Input);
}
if(phone1Input2) {
phone1Input2.value = profilesOb[spI].phone_number.substr(0, 3);
trigger_change_event(phone1Input2);
}
if(phone2Input) {
phone2Input.value = profilesOb[spI].phone_number.substr(3, 8);
trigger_input_event(phone2Input);
}
if(phone2Input2) {
phone2Input2.value = profilesOb[spI].phone_number.substr(3, 8);
trigger_input_event(phone2Input2);
}
if(carrierInput) {
if (profilesOb[spI].carrier == carrier.SKT || profilesOb[spI].carrier == carrier.SKT_MVNO) {
Expand All @@ -644,6 +671,7 @@ window.onload = function () {
} else if (profilesOb[spI].carrier == carrier.LGU || profilesOb[spI].carrier == carrier.LGU_MVNO) {
carrierInput.value = 'L';
}
trigger_change_event(carrierInput);
}
if(agreeInput && !agreeInput.checked) {
agreeInput.click();
Expand All @@ -666,15 +694,19 @@ window.onload = function () {

if(nameInput) {
nameInput.value = profilesOb[spI].name;
trigger_input_event(nameInput);
}
if(birthDateInput) {
birthDateInput.value = profilesOb[spI].birth;
trigger_input_event(birthDateInput);
}
if(phone1Input) {
phone1Input.value = profilesOb[spI].phone_number.substr(0, 3);
trigger_change_event(phone1Input);
}
if(phone2Input) {
phone2Input.value = profilesOb[spI].phone_number.substr(3, 8);
trigger_input_event(phone2Input);
}
if(carrierInput) {
if (profilesOb[spI].carrier == carrier.SKT || profilesOb[spI].carrier == carrier.SKT_MVNO) {
Expand All @@ -684,6 +716,7 @@ window.onload = function () {
} else if (profilesOb[spI].carrier == carrier.LGU || profilesOb[spI].carrier == carrier.LGU_MVNO) {
carrierInput.value = 'L';
}
trigger_change_event(carrierInput);
}
if(agreeInput && !agreeInput.checked) {
agreeInput.click();
Expand All @@ -706,15 +739,19 @@ window.onload = function () {

if(nameInput) {
nameInput.value = profilesOb[spI].name;
trigger_input_event(nameInput);
}
if(birthDateInput) {
birthDateInput.value = profilesOb[spI].birth;
trigger_input_event(birthDateInput);
}
if(phone1Input) {
phone1Input.value = profilesOb[spI].phone_number.substr(0, 3);
trigger_change_event(phone1Input);
}
if(phone2Input) {
phone2Input.value = profilesOb[spI].phone_number.substr(3, 8);
trigger_input_event(phone2Input);
}
if(carrierInput) {
if (profilesOb[spI].carrier == carrier.SKT || profilesOb[spI].carrier == carrier.SKT_MVNO) {
Expand All @@ -724,6 +761,7 @@ window.onload = function () {
} else if (profilesOb[spI].carrier == carrier.LGU || profilesOb[spI].carrier == carrier.LGU_MVNO) {
carrierInput.value = 'L';
}
trigger_change_event(carrierInput);
}
if(agreeInput && !agreeInput.checked) {
agreeInput.click();
Expand All @@ -743,15 +781,19 @@ window.onload = function () {

if(nameInput) {
nameInput.value = profilesOb[spI].name;
trigger_input_event(nameInput);
}
if(birthDateInput) {
birthDateInput.value = profilesOb[spI].birth;
trigger_input_event(birthDateInput);
}
if(phone1Input) {
phone1Input.value = profilesOb[spI].phone_number.substr(0, 3);
trigger_change_event(phone1Input);
}
if(phone2Input) {
phone2Input.value = profilesOb[spI].phone_number.substr(3, 8);
trigger_input_event(phone2Input);
}
if(carrierInput) {
if (profilesOb[spI].carrier == carrier.SKT || profilesOb[spI].carrier == carrier.SKT_MVNO) {
Expand All @@ -761,6 +803,7 @@ window.onload = function () {
} else if (profilesOb[spI].carrier == carrier.LGU || profilesOb[spI].carrier == carrier.LGU_MVNO) {
carrierInput.value = 'L';
}
trigger_change_event(carrierInput);
}
if(agreeInput && !agreeInput.checked) {
agreeInput.click();
Expand All @@ -781,15 +824,19 @@ window.onload = function () {

if(nameInput) {
nameInput.value = profilesOb[spI].name;
trigger_input_event(nameInput);
}
if(birthDateInput) {
birthDateInput.value = profilesOb[spI].birth.substr(2, 6);
trigger_input_event(birthDateInput);
}
if(phone1Input) {
phone1Input.value = profilesOb[spI].phone_number.substr(0, 3);
trigger_change_event(phone1Input);
}
if(phone2Input) {
phone2Input.value = profilesOb[spI].phone_number.substr(3, 8);
trigger_input_event(phone2Input);
}
if(carrierInput) {
if (profilesOb[spI].carrier == carrier.SKT || profilesOb[spI].carrier == carrier.SKT_MVNO) {
Expand All @@ -799,6 +846,7 @@ window.onload = function () {
} else if (profilesOb[spI].carrier == carrier.LGU || profilesOb[spI].carrier == carrier.LGU_MVNO) {
carrierInput.value = 'L';
}
trigger_change_event(carrierInput);
}
if(agreeInput && !agreeInput.checked) {
agreeInput.click();
Expand Down

0 comments on commit c268660

Please sign in to comment.