-
Notifications
You must be signed in to change notification settings - Fork 8
/
autofill.js
1467 lines (1268 loc) · 97.5 KB
/
autofill.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
function getBrowser() {
if(typeof browser !== 'undefined') {
return browser
}else if(typeof chrome !== 'undefined') {
return chrome
}
}
browser = getBrowser();
debug = false
/**
* 개발진행시 console.log()
* @param {string} string - 출력할 문자열
*/
function log(string) {
if (debug) {
this.console.log(string);
}
}
var carrier = {
SKT: '1',
KT: '2',
LGU: '3',
SKT_MVNO: '4',
KT_MVNO: '5',
LGU_MVNO: '6'
}
var way = {
SMS: '1',
PASS: '2'
}
/**
* 주민등록번호 7번째 자리(성별) 가져오기
* @param {number} birth - 생년월일 8자리
* @param {number} gender - 성별 코드
* @param {number} foreigner - 내/외국인 코드
* @returns {number} 주민등록번호 7번째 자리
*/
function get_RRN_GenderNum(birth, gender, foreigner) {
// 9: 1800 ~ 1899년에 태어난 남성
// 0: 1800 ~ 1899년에 태어난 여성
// 1: 1900 ~ 1999년에 태어난 남성
// 2: 1900 ~ 1999년에 태어난 여성
// 3: 2000 ~ 2099년에 태어난 남성
// 4: 2000 ~ 2099년에 태어난 여성
// 5: 1900 ~ 1999년에 태어난 외국인 남성
// 6: 1900 ~ 1999년에 태어난 외국인 여성
// 7: 2000 ~ 2099년에 태어난 외국인 남성
// 8: 2000 ~ 2099년에 태어난 외국인 여성
if (birth.substr(0, 2) == '18') {
var num = gender == '1' ? 9 : 0;
} else if (birth.substr(0, 2) == '19' && foreigner == '0') {
var num = gender;
} else if (birth.substr(0, 2) == '20' && foreigner == '0') {
var num = Number(gender) + 2;
} else if (birth.substr(0, 2) == '19' && foreigner == '1') {
var num = Number(gender) + 4;;
} else if (birth.substr(0, 2) == '20' && foreigner == '1') {
var num = Number(gender) + 6;
}
return num;
};
function is_MNO(carrier_code) {
// MNO(Mobile Network Operator)
// 이동통신망사업자
// SKT, KT, LGU+
return Number(carrier_code) < 4;
}
function is_MVNO(carrier_code) {
// MVNO(Mobile Virtual Network Operator)
// 가상이동통신망사업자
// 알뜰폰
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}));
}
/**
* 행정안전부 "민간 간편인증 서비스" 자동완성
* @param {string} nameQ - 이름 input element query string
* @param {string} birth8DigitQ - 생년월일 8자리 input element query string
* @param {string} birth6DigitQ - 생년월일 6자리 input element query string
* @param {string} rrnQ - 주민등록번호 뒷자리 input element query string
* @param {string} phone1Q - 전화번호 앞 3자리 input element query string
* @param {string} phone2Q - 전화번호 뒤 8자리 input element query string
* @param {string} carrierQ - 통신사 input element query string
* @param {string} agreeQ - 약관동의 input element query string
* @returns {number} interval ID
*/
function autofill_for_mois(selectedProfile, nameQ, birth8DigitQ, birth6DigitQ, rrnQ, phone1Q, phone2Q, carrierQ, agreeQ) {
return setInterval(function() {
nameInput = this.document.querySelector(nameQ);
birthDate8DigitInput = this.document.querySelector(birth8DigitQ);
birthDate6DigitInput = this.document.querySelector(birth6DigitQ);
rrnInput = this.document.querySelector(rrnQ);
phone1Input = this.document.querySelector(phone1Q);
phone2Input = this.document.querySelector(phone2Q);
carrierInput = this.document.querySelector(carrierQ);
agreeInput = this.document.querySelector(agreeQ);
// 이름
if(nameInput) {
nameInput.value = selectedProfile.name;
trigger_input_event(nameInput);
}
// 생년월일 8자리
if(birthDate8DigitInput) {
birthDate8DigitInput.value = selectedProfile.birth;
trigger_input_event(birthDate8DigitInput);
}
// 생년월일 6자리
if(birthDate6DigitInput) {
birthDate6DigitInput.value = selectedProfile.birth.substr(2, 6);
trigger_input_event(birthDate6DigitInput);
}
// 전화번호 앞 3자리
if(phone1Input) {
phone1Input.value = selectedProfile.phone_number.substr (0, 3);
trigger_change_event(phone1Input);
}
// 전화번호 뒤 8자리
if(phone2Input) {
phone2Input.value = selectedProfile.phone_number.substr(3, 8);
trigger_input_event(phone2Input);
}
// 통신사
if(carrierInput) {
if (selectedProfile.carrier == carrier.SKT || selectedProfile.carrier == carrier.SKT_MVNO) {
carrierInput.value = 'S';
} else if (selectedProfile.carrier == carrier.KT || selectedProfile.carrier == carrier.KT_MVNO) {
carrierInput.value = 'K';
} else if (selectedProfile.carrier == carrier.LGU || selectedProfile.carrier == carrier.LGU_MVNO) {
carrierInput.value = 'L';
}
trigger_change_event(carrierInput);
}
// 약관동의
if(agreeInput && !agreeInput.checked) {
agreeInput.click();
// 주민등록번호 입력 포커스
if(rrnInput) {
rrnInput.focus();
}
}
}, 500);
}
window.onload = function () {
log('Auth Autofill (본인인증 자동완성)\n한국 휴대전화 본인인증 서비스 자동완성 브라우저 확장 프로그램');
browser.storage.sync.get(function (data) {
if (data.on) {
log('ON');
if (data.profiles) {
var profilesOb = JSON.parse(data.profiles).profiles;
var spI = data.selectedProfile;
var selectedProfile = profilesOb[spI];
var carrier = {
SKT: '1',
KT: '2',
LGU: '3',
SKT_MVNO: '4',
KT_MVNO: '5',
LGU_MVNO: '6'
};
var way = {
SMS: '1',
PASS: '2'
};
if (window.location.hostname == 'nice.checkplus.co.kr') {
log('나이스신용평가정보');
// Todo: 보안프로그램 실행시 자동완성 작동안함
var isPC = !window.location.search.includes('authMobileMain');
if (this.document.getElementById('telcomSK')) { //통신사 선택페이지
log("통신사 선택페이지");
// 통신사 선택
if (profilesOb[spI].carrier == carrier.SKT) {
this.document.getElementById('telcomSK').click();
} else if (profilesOb[spI].carrier == carrier.KT) {
this.document.getElementById('telcomKT').click();
} else if (profilesOb[spI].carrier == carrier.LGU) {
this.document.getElementById('telcomLG').click();
} else if (profilesOb[spI].carrier == carrier.SKT_MVNO) {
this.document.getElementById('telcomSM').click();
} else if (profilesOb[spI].carrier == carrier.KT_MVNO) {
this.document.getElementById('telcomKM').click();
} else if (profilesOb[spI].carrier == carrier.LGU_MVNO) {
this.document.getElementById('telcomLM').click();
}
} else if (this.document.querySelector("#frm > section > div > ul > li:nth-child(1) > button")) {
// 인증방식 선택페이지 (모바일에서 PASS 선택시)
if (profilesOb[spI].way == way.SMS) { // SMS인증을 원하는 경우
try {
this.document.querySelector("#frm > section > div > ul > li:nth-child(3) > button").click();
} catch (e) {
// 모바일 페이지
this.document.querySelector("#frm > section > div > ul > li:nth-child(2) > button").click();
}
} else if (profilesOb[spI].way == way.PASS) { // PASS인증을 원하는 경우
this.document.querySelector("#frm > section > div > ul > li:nth-child(1) > button").click();
}
this.document.getElementById('mobileCertAgree').click();
this.document.getElementById('btnMobileCertStart').click();
} else {
if (profilesOb[spI].way == way.SMS) { // SMS인증을 원하는 경우
this.document.getElementById('userName').value = profilesOb[spI].name;
this.document.getElementById('btnSubmit').click();
this.document.getElementById('myNum1').value = profilesOb[spI].birth.substr(2, 6);
this.document.getElementById('myNum2').value = get_RRN_GenderNum(profilesOb[spI].birth, profilesOb[spI].gender, profilesOb[spI].foreigner);
this.document.querySelector("#frm > div > div.group_smsway > ul > li.step_item.step_tel").classList.add('on');
this.document.getElementById('mobileNo').value = profilesOb[spI].phone_number;
this.document.querySelector("#frm > div > div.group_smsway > ul > li.step_item.step_captcha").classList.add('on');
this.document.getElementById('captchaAnswer').focus();
} else if (profilesOb[spI].way == way.PASS) { // PASS인증을 원하는 경우
if (this.document.getElementById('userName')) {
// PC
this.document.getElementById('userName').value = profilesOb[spI].name;
this.document.querySelector("#frm > div > div.group_smsway > button").click();
this.document.getElementById('mobileNo').value = profilesOb[spI].phone_number;
this.document.querySelector("#frm > div > div.group_smsway > ul > li.step_item.step_captcha").classList.add('on');
this.document.getElementById('captchaAnswer').focus();
} else {
// 모바일
this.document.getElementById("btnTransaction").click();
}
}
}
} else if (window.location.hostname == 'pcc.siren24.com') {
log('서울신용평가정보');
var isPC = window.location.pathname.includes('passWebV2');
if (this.document.querySelector("#ct > form:nth-child(1) > fieldset > ul.agency_select__items")) { //통신사 선택페이지
log('통신사 선택 페이지');
if (profilesOb[spI].carrier == carrier.SKT) {
var carrierBtn = 'agency-sk';
} else if (profilesOb[spI].carrier == carrier.KT) {
var carrierBtn = 'agency-kt';
} else if (profilesOb[spI].carrier == carrier.LGU) {
var carrierBtn = 'agency-lgu';
} else {
var carrierBtn = 'agency-and';
}
this.document.getElementById(carrierBtn).click();
if (!is_MNO(profilesOb[spI].carrier)) {
if (profilesOb[spI].carrier == carrier.SKT_MVNO) {
this.document.querySelector("#skm_mvno").click();
} else if (profilesOb[spI].carrier == carrier.KT_MVNO) {
this.document.querySelector("#ktm_mvno").click();
} else if (profilesOb[spI].carrier == carrier.LGU_MVNO) {
this.document.querySelector("#lgm_mvno").click();
}
this.document.querySelector("#btnSelect").click();
}
// 약관 동의
this.document.querySelector("#ct > form:nth-child(1) > fieldset > ul.agreelist.all > li > span > label:nth-child(2)").click();
// 다음 페이지 버튼
if (profilesOb[spI].way == way.SMS) { // SMS인증을 원하는 경우
this.document.querySelector("#btnSms").click();
} else if (profilesOb[spI].way == way.PASS) { // PASS인증을 원하는 경우
this.document.querySelector("#btnPass").click();
}
} else {
if (profilesOb[spI].way == way.SMS) { // SMS인증을 원하는 경우
if (isPC && this.document.querySelector("#sms_auth") && this.document.querySelector("#sms_auth").title != '선택됨') { //sms아닐때
this.document.querySelector("#sms_auth").click();
} else {
this.document.getElementById('userName').value = profilesOb[spI].name;
this.document.getElementById(isPC ? 'birthDay1' : 'birthDay').value = profilesOb[spI].birth.substr(2, 6);
this.document.getElementById('birthDay2').value = get_RRN_GenderNum(profilesOb[spI].birth, profilesOb[spI].gender, profilesOb[spI].foreigner)
this.document.getElementById('No').value = profilesOb[spI].phone_number;
if (isPC) {
this.document.getElementById('secur').focus();
}
}
} else if (profilesOb[spI].way == way.PASS) { // PASS인증을 원하는 경우
if (isPC && this.document.querySelector("#qr_auth") && this.document.querySelector("#qr_auth").title != '선택됨') { //sms아닐때
this.document.querySelector("#sms_auth").click();
} else {
this.document.getElementsByName('userName')[0].value = profilesOb[spI].name;
this.document.getElementsByName('No')[0].value = profilesOb[spI].phone_number;
if (isPC) {
this.document.getElementById('secur').focus();
}
}
}
}
} else if (window.location.hostname == 'safe.ok-name.co.kr') {
log('코리아크레딧뷰로');
var isPC = !window.location.pathname.includes('MCommonSvl');
if (!isPC) { // 모바일일때
if (document.querySelector("#sms_auth") && !document.querySelector("#nm")) { // 인증방식 선택 페이지
if (profilesOb[spI].way == way.SMS) { // SMS인증을 원하는 경우
this.document.querySelector("#sms_auth").click();
} else if (profilesOb[spI].way == way.PASS) { // PASS인증을 원하는 경우
this.document.querySelector("#push_auth").click();
}
} else {
this.document.getElementById('nm').value = profilesOb[spI].name;
if (document.getElementById('ssn6')) {
this.document.getElementById('ssn6').value = profilesOb[spI].birth.substr(2, 6);
this.document.getElementById('ssn1').value = get_RRN_GenderNum(profilesOb[spI].birth, profilesOb[spI].gender, profilesOb[spI].foreigner);
}
this.document.getElementById('mbphn_no').value = profilesOb[spI].phone_number;
this.document.getElementById('captchaCode').focus();
}
} else if (document.querySelector("#ct > form > fieldset > ul.agency_select__items")) { //통신사 선택페이지
log("통신사 선택페이지");
// 통신사 선택
if (profilesOb[spI].carrier == carrier.SKT) {
var carrierBtn = 'agency-skt';
} else if (profilesOb[spI].carrier == carrier.KT) {
var carrierBtn = 'agency-kt';
} else if (profilesOb[spI].carrier == carrier.LGU) {
var carrierBtn = 'agency-lgu';
} else {
var carrierBtn = 'agency-and';
}
this.document.getElementById(carrierBtn).click();
if (carrierBtn == 'agency-and') {
if (profilesOb[spI].carrier == carrier.SKT_MVNO) {
this.document.querySelector("ul > li:nth-child(1) > div.licensee_title > a > label").click();
} else if (profilesOb[spI].carrier == carrier.KT_MVNO) {
this.document.querySelector("ul > li:nth-child(2) > div.licensee_title > a > label").click();
} else if (profilesOb[spI].carrier == carrier.LGU_MVNO) {
this.document.querySelector("ul > li:nth-child(3) > div.licensee_title > a > label").click();
}
this.document.querySelector("#mvnoCheck").click();
}
// 약관 동의
this.document.querySelector("#ct > form > fieldset > ul.agreelist.all > li > span > label:nth-child(2)").click();
// 인증하기 버튼
this.document.querySelector("#btnPass").click();
} else {
if (profilesOb[spI].way == way.SMS) { // SMS인증을 원하는 경우
if (document.querySelector("#header > ul > li.on").innerText != "문자(SMS)로 인증") { //sms아닐때
this.document.getElementById('sms_auth').click();
} else {
this.document.getElementById('nm').value = profilesOb[spI].name;
this.document.getElementById('ssn6').value = profilesOb[spI].birth.substr(2, 6);
this.document.getElementById('ssn1').value = get_RRN_GenderNum(profilesOb[spI].birth, profilesOb[spI].gender, profilesOb[spI].foreigner);
this.document.getElementById('mbphn_no').value = profilesOb[spI].phone_number;
this.document.getElementById('nm').focus();
this.document.getElementById('ssn6').focus();
this.document.getElementById('ssn1').focus();
this.document.getElementById('mbphn_no').focus();
this.document.getElementById('captchaCode').focus();
}
} else if (profilesOb[spI].way == way.PASS) { // PASS인증을 원하는 경우
if (document.querySelector("#header > ul > li.on").innerText != "PASS로 인증하기") { //PASS아닐때
this.document.getElementById('qr_auth').click();
} else {
this.document.getElementById('nm').value = profilesOb[spI].name;
this.document.getElementById('mbphn_no').value = profilesOb[spI].phone_number;
this.document.getElementById('nm').focus();
this.document.getElementById('mbphn_no').focus();
this.document.getElementById('captchaCode').focus();
}
}
}
} else if (window.location.hostname == 'cert.mobile-ok.com') {
log('드림시큐리티');
var isPC = window.location.pathname.includes('CommonQR');
// 보안 프로그램 설치 유도창 닫기
var closeInterval = setInterval(function() {
if (this.document.querySelector("#modal_close")) {
this.document.querySelector("#modal_close").click();
clearInterval(closeInterval);
}
}, 500);
if (this.document.getElementById('agency-sk').value == 'SKT') {
if (profilesOb[spI].carrier == carrier.SKT) {
var carrierBtn = 'agency-sk';
} else if (profilesOb[spI].carrier == carrier.KT) {
var carrierBtn = 'agency-kt';
} else if (profilesOb[spI].carrier == carrier.LGU) {
var carrierBtn = 'agency-lgu';
} else {
var carrierBtn = 'agency-and';
}
this.document.getElementById(carrierBtn).click();
if (carrierBtn == 'agency-and') {
if (profilesOb[spI].carrier == carrier.SKT_MVNO) {
var carrierBtn = 'agency-skmvno';
} else if (profilesOb[spI].carrier == carrier.KT_MVNO) {
var carrierBtn = 'agency-ktmvno';
} else if (profilesOb[spI].carrier == carrier.LGU_MVNO) {
var carrierBtn = 'agency-lgumvno';
}
this.document.getElementById(carrierBtn).click();
this.document.getElementById("checkMvno").click();
}
// 약관 동의
if (isPC) {
this.document.querySelector("#agreelist_chk > li.w-100 > span > label:nth-child(2)").click();
} else {
this.document.querySelector("#agreelist_chk > li.all.agreeCheck > span > label").click();
}
// 다음페이지 버튼
if (isPC) {
this.document.querySelector('#ct > fieldset > button').click();
} else {
this.document.querySelector("#start").click();
}
}
if (profilesOb[spI].way == way.SMS) { // SMS인증을 원하는 경우
if (this.document.querySelector("#gnb_sms").style['display'] == 'none') { //sms아닐때
this.document.querySelector("#gnb_pass > div > ul > li.tab_sms").click();
} else if (document.querySelector("#qr_con > div.qrcon_info_noti > ul > li:nth-child(4) > div > ul > li:nth-child(2) > button")) {
this.document.querySelector("#qr_con > div.qrcon_info_noti > ul > li:nth-child(4) > div > ul > li:nth-child(2) > button").click();
}
this.document.querySelector("#common_step3 > div > div > div > section > fieldset > ul > li.name > div > input[type=text]").value = profilesOb[spI].name;
this.document.getElementById('mynum1').value = profilesOb[spI].birth.substr(2, 6);
this.document.getElementById('mynum2').value = get_RRN_GenderNum(profilesOb[spI].birth, profilesOb[spI].gender, profilesOb[spI].foreigner)
this.document.querySelector("#common_step3 > div > div > div > section > fieldset > ul > li:nth-child(3) > div > input[type=tel]").value = profilesOb[spI].phone_number;
this.document.getElementById('secur').focus();
} else if (profilesOb[spI].way == way.PASS) { // PASS인증을 원하는 경우
if (this.document.querySelector("#gnb_pass").style['display'] == 'none') { //PASS아닐때
this.document.querySelector("#gnb_sms > div > ul > li.tab_simple").click();
} else if (this.document.getElementById('name')) {
this.document.getElementById('name').value = profilesOb[spI].name;
this.document.getElementById('phone').value = profilesOb[spI].phone_number;
this.document.getElementById('secur').focus();
}
}
} else if (window.location.hostname == 'www.kmcert.com') {
log('한국모바일인증');
// PC: https://www.kmcert.com/kmcis/web_v4/kmcisHp00.jsp
// Mobile: https://www.kmcert.com/kmcis/pass_m/kmcisPass00.jsp
var isPC = window.location.pathname.includes('web_v4');
if (this.document.querySelector('#ct > fieldset')) { //통신사 선택페이지
if (profilesOb[spI].carrier == carrier.SKT) {
var carrierBtn = 'agency-sk';
} else if (profilesOb[spI].carrier == carrier.KT) {
var carrierBtn = 'agency-kt';
} else if (profilesOb[spI].carrier == carrier.LGU) {
var carrierBtn = 'agency-lgu';
} else {
var carrierBtn = 'agency-and';
}
this.document.getElementById(carrierBtn).click();
if (isPC && !is_MNO(profilesOb[spI].carrier)) { // 알뜰폰 통신사 선택페이지
if (profilesOb[spI].carrier == carrier.SKT_MVNO) {
this.document.querySelector("#wrap > div:nth-child(5) > div.layer-pop.agency_select__popup > form > div.pop-con_02 > ul > li.first-item > div.licensee_title.agency-popup-sk > a > label").click();
} else if (profilesOb[spI].carrier == carrier.KT_MVNO) {
this.document.querySelector("#wrap > div:nth-child(5) > div.layer-pop.agency_select__popup > form > div.pop-con_02 > ul > li:nth-child(2) > div.licensee_title.agency-popup-kt > a > label").click();
} else if (profilesOb[spI].carrier == carrier.LGU_MVNO) {
this.document.querySelector("#wrap > div:nth-child(5) > div.layer-pop.agency_select__popup > form > div.pop-con_02 > ul > li:nth-child(3) > div.licensee_title.agency-popup-lgu > a > label").click();
}
this.document.querySelector("#wrap > div:nth-child(5) > div.layer-pop.agency_select__popup > form > div.pop-btn.pop-btn_02 > ul > li.lastChild.activeDarkGray > button").click();
}
// 약관 동의
if (isPC) {
this.document.querySelector("#ct > fieldset > ul.agreelist.all > li > span > label:nth-child(2)").click();
} else {
this.document.querySelector("#agreelist_chk > li.all > span > label").click();
}
// 다음 페이지 클릭
if (isPC) {
if (profilesOb[spI].way == way.SMS) { // SMS인증을 원하는 경우
this.document.querySelector("#btnSms").click();
} else if (profilesOb[spI].way == way.PASS) { // PASS인증을 원하는 경우
this.document.querySelector("#btnPassTran").click();
}
} else {
this.document.querySelector("#ct > fieldset > form > button").click();
}
} else if (!isPC && this.document.querySelector("#mvno_corp_skm")) { // 모바일페이지 MVNO 선택페이지
if (profilesOb[spI].carrier == carrier.SKT_MVNO) {
this.document.querySelector("#mvno_corp_skm").click();
} else if (profilesOb[spI].carrier == carrier.KT_MVNO) {
this.document.querySelector("#mvno_corp_ktm").click();
} else if (profilesOb[spI].carrier == carrier.LGU_MVNO) {
this.document.querySelector("#mvno_corp_lgm").click();
}
// 약관 동의
this.document.querySelector("#agreelist_chk > li > span > label").click();
// 확인 클릭
this.document.querySelector("#t_ag_wp > div.container > div.btn_area > a.btn_rac.btn_ok").click();
} else {
if (isPC) {
if (profilesOb[spI].way == way.SMS) { // SMS인증을 원하는 경우
if (this.document.querySelector("#sms_auth").title != '선택됨') { //sms아닐때
this.document.querySelector("#sms_auth").click();
} else {
this.document.getElementById('userName').value = profilesOb[spI].name;
this.document.getElementById('Birth').value = profilesOb[spI].birth.substr(2, 6);
this.document.getElementById('Sex').value = get_RRN_GenderNum(profilesOb[spI].birth, profilesOb[spI].gender, profilesOb[spI].foreigner);
this.document.getElementById('No').value = profilesOb[spI].phone_number;
this.document.getElementById('securityNum').focus();
}
} else if (profilesOb[spI].way == way.PASS) { // PASS인증을 원하는 경우
if (this.document.querySelector("#qr_auth").title != '선택됨') { //sms아닐때
this.document.querySelector("#qr_auth").click();
} else {
this.document.getElementById('userName').value = profilesOb[spI].name;
this.document.getElementById('No').value = profilesOb[spI].phone_number;
this.document.getElementById('securityNum').focus();
}
}
} else {
if (profilesOb[spI].way == way.SMS) { // SMS인증을 원하는 경우
if (this.document.querySelector("#ct > article.ui_cover.app_down > button")) { //sms아닐때
this.document.querySelector("#ct > article.ui_cover.app_down > button").click();
} else {
this.document.querySelector("#name").value = profilesOb[spI].name;
this.document.querySelector("#mynum1").value = profilesOb[spI].birth.substr(2, 6);
this.document.querySelector("#mynum2").value = get_RRN_GenderNum(profilesOb[spI].birth, profilesOb[spI].gender, profilesOb[spI].foreigner);
this.document.querySelector("#phone").value = profilesOb[spI].phone_number;
}
}
// 모바일페이지에서 PASS는 입력없이 앱실행
}
}
} else if (window.location.hostname == 'cert.kcp.co.kr') {
log('한국사이버결제');
var isPC = !window.location.pathname.includes('/mo');
if (this.document.querySelector("#frm > fieldset")) { //통신사 선택페이지
if (profilesOb[spI].carrier == carrier.SKT) {
var carrierBtn = 'agency-sk';
} else if (profilesOb[spI].carrier == carrier.KT) {
var carrierBtn = 'agency-kt';
} else if (profilesOb[spI].carrier == carrier.LGU) {
var carrierBtn = 'agency-lgu';
} else {
var carrierBtn = 'agency-and';
}
this.document.getElementById(carrierBtn).click();
if (!is_MNO(profilesOb[spI].carrier)) { // 알뜰폰 통신사 선택페이지
if (profilesOb[spI].carrier == carrier.SKT_MVNO) {
this.document.querySelector("form > div.pop-con_02 > ul > li:nth-child(1) > label").click();
} else if (profilesOb[spI].carrier == carrier.KT_MVNO) {
this.document.querySelector("form > div.pop-con_02 > ul > li:nth-child(2) > label").click();
} else if (profilesOb[spI].carrier == carrier.LGU_MVNO) {
this.document.querySelector("form > div.pop-con_02 > ul > li:nth-child(3) > label").click();
}
this.document.querySelector("#btnMvnoSelect").click();
}
// 약관 동의
if (isPC) {
this.document.querySelector("#frm > fieldset > ul.agreelist.all > li > div > label:nth-child(2)").click();
} else {
this.document.querySelector("#agree_all").click();
}
if (profilesOb[spI].way == way.SMS) { // SMS인증을 원하는 경우
this.document.querySelector("#btnSms").click();
} else if (profilesOb[spI].way == way.PASS) { // PASS인증을 원하는 경우
this.document.querySelector("#btnPass").click();
}
} else if (this.document.getElementById('user_name')) {
if (profilesOb[spI].way == way.SMS) { // SMS인증을 원하는 경우
this.document.getElementById('user_name').value = profilesOb[spI].name;
this.document.getElementById('mynum1').value = profilesOb[spI].birth.substr(2, 6);
this.document.getElementById('mynum2').value = get_RRN_GenderNum(profilesOb[spI].birth, profilesOb[spI].gender, profilesOb[spI].foreigner);
this.document.getElementById(isPC ? 'phone_no_rKey' : 'phone_no').value = profilesOb[spI].phone_number;
this.document.getElementById('captcha_no').focus();
} else if (profilesOb[spI].way == way.PASS) { // PASS인증을 원하는 경우
this.document.getElementById('user_name').value = profilesOb[spI].name;
this.document.getElementById(isPC ? 'phone_no_rKey' : 'phone_no').value = profilesOb[spI].phone_number;
this.document.getElementById('captcha_no').focus();
}
}
} else if (window.location.hostname == 'nid.naver.com') {
log('네이버');
this.document.querySelector("#chk_agree3Lb").click();
this.document.getElementById('nm').value = profilesOb[spI].name;
this.document.getElementById('foreignYn').value = (profilesOb[spI].foreigner == '0' ? 'N' : 'Y')
this.document.getElementById(profilesOb[spI].gender == '1' ? 'man' : 'woman').click()
this.document.getElementById('birth_year').value = profilesOb[spI].birth.substr(0, 4);
this.document.getElementById('birth_month').value = Number(profilesOb[spI].birth.substr(4, 2));
this.document.getElementById('birth_day').value = Number(profilesOb[spI].birth.substr(6, 2));
if (profilesOb[spI].carrier == carrier.SKT) {
var carrierBtn = 'SKT';
this.document.getElementById('mobile_cd').value = carrierBtn;
} else if (profilesOb[spI].carrier == carrier.KT) {
var carrierBtn = 'KTF';
this.document.getElementById('mobile_cd').value = carrierBtn;
} else if (profilesOb[spI].carrier == carrier.LGU) {
var carrierBtn = 'LGT';
this.document.getElementById('mobile_cd').value = carrierBtn;
} else {
var carrierBtn = 'MVNO';
this.document.getElementById('mobile_cd').value = carrierBtn;
this.document.getElementById('mobile_cd').click();
if (profilesOb[spI].carrier == carrier.SKT_MVNO) {
var carrierBtn = 'mvno_skLb';
} else if (profilesOb[spI].carrier == carrier.KT_MVNO) {
var carrierBtn = 'mvno_ktLb';
} else if (profilesOb[spI].carrier == carrier.LGU_MVNO) {
var carrierBtn = 'mvno_lgLb';
}
this.document.getElementById(carrierBtn).click();
}
this.document.getElementById('phone_no').value = profilesOb[spI].phone_number;
this.document.querySelector("#auth_no").focus();
} else if (window.location.hostname == 'wauth.teledit.com') {
log('다날');
if (profilesOb[spI].carrier == carrier.SKT) {
var carrierBtn = 'agency-sk';
} else if (profilesOb[spI].carrier == carrier.KT) {
var carrierBtn = 'agency-kt';
} else if (profilesOb[spI].carrier == carrier.LGU) {
var carrierBtn = 'agency-lgu';
} else {
var carrierBtn = 'agency-and';
}
this.document.getElementById(carrierBtn).click();
if (!is_MNO(profilesOb[spI].carrier)) {
if (profilesOb[spI].carrier == carrier.SKT_MVNO) {
this.document.querySelector("#layerPopupMvno > div.layer-pop > form > div.pop-con_02 > ul > li.first-item > div.licensee_title > a > label").click();
} else if (profilesOb[spI].carrier == carrier.KT_MVNO) {
this.document.querySelector("#layerPopupMvno > div.layer-pop > form > div.pop-con_02 > ul > li:nth-child(2) > div.licensee_title > a > label").click();
} else if (profilesOb[spI].carrier == carrier.LGU_MVNO) {
this.document.querySelector("#layerPopupMvno > div.layer-pop > form > div.pop-con_02 > ul > li:nth-child(3) > div.licensee_title > a > label").click();
}
this.document.querySelector("#btnSelectMvno").click();
}
// 약관 동의
this.document.querySelector("#agree_all").click();
// 인증 방식 선택
if (profilesOb[spI].way == way.SMS) { // SMS인증을 원하는 경우
this.document.querySelector("#btnSms").click();
} else if (profilesOb[spI].way == way.PASS) { // PASS인증을 원하는 경우
this.document.querySelector("#btnPass").click();
}
// 자동완성
if (profilesOb[spI].way == way.SMS) { // SMS인증을 원하는 경우
if (this.document.querySelector("#authTabSms > a")) {
if (this.document.querySelector("#authTabSms > a").title != '선택됨') { //sms아닐때
this.document.getElementById('authTabSms').click();
}
}
this.document.getElementById('sms_username').value = profilesOb[spI].name;
this.document.getElementById('sms_mynum1').value = profilesOb[spI].birth.substr(2, 6);
this.document.getElementById('sms_mynum2').value = get_RRN_GenderNum(profilesOb[spI].birth, profilesOb[spI].gender, profilesOb[spI].foreigner);
this.document.getElementById('sms_mobileno').value = profilesOb[spI].phone_number;
this.document.getElementById('inputCaptcha').focus();
} else if (profilesOb[spI].way == way.PASS) { // PASS인증을 원하는 경우
if (this.document.querySelector("#authTabPass > a")) {
if (this.document.querySelector("#authTabPass > a").title != '선택됨') { //sms아닐때
this.document.getElementById('authTabPass').click();
}
}
this.document.getElementById('push_username').value = profilesOb[spI].name;
this.document.getElementById('push_mobileno').value = profilesOb[spI].phone_number;
this.document.getElementById('inputCaptcha').focus();
}
} else if (window.location.hostname == 'auth.mobilians.co.kr') {
log('KG모빌리언스');
if (profilesOb[spI].carrier == carrier.SKT) {
var carrierBtn = 'agency-sk';
} else if (profilesOb[spI].carrier == carrier.KT) {
var carrierBtn = 'agency-kt';
} else if (profilesOb[spI].carrier == carrier.LGU) {
var carrierBtn = 'agency-lgu';
} else {
var carrierBtn = 'agency-and';
}
this.document.getElementById(carrierBtn).click();
if (!is_MNO(profilesOb[spI].carrier)) {
if (profilesOb[spI].carrier == carrier.SKT_MVNO) {
this.document.querySelector("#agency-popup-sk").click();
} else if (profilesOb[spI].carrier == carrier.KT_MVNO) {
this.document.querySelector("#agency-popup-kt").click();
} else if (profilesOb[spI].carrier == carrier.LGU_MVNO) {
this.document.querySelector("#agency-popup-lgu").click();
}
this.document.querySelector("#mvnoConfirmBtn").click();
}
// 약관 동의
this.document.querySelector("#agree_all").click();
// 인증 방식 선택
if (profilesOb[spI].way == way.SMS) { // SMS인증을 원하는 경우
this.document.querySelector("#commidSelect > button.btn_r.btn_type6.btn_r.btn_skip2.btnSms").click();
} else if (profilesOb[spI].way == way.PASS) { // PASS인증을 원하는 경우
this.document.querySelector("#commidSelect > button.btn_r.btn_type6.btn_r.btn_skip.btnSubmit").click();
}
// 자동완성
if (profilesOb[spI].way == way.SMS) { // SMS인증을 원하는 경우
if (document.querySelector("#authTab > li.on > a")) {
if (document.querySelector("#authTab > li.on > a").id != 'sms_auth') { //sms아닐때
this.document.getElementById('sms_auth').click();
}
}
this.document.getElementById('smsName').value = profilesOb[spI].name;
this.document.getElementById('birthYMD').value = profilesOb[spI].birth.substr(2, 6);
this.document.getElementById('birthSF').value = get_RRN_GenderNum(profilesOb[spI].birth, profilesOb[spI].gender, profilesOb[spI].foreigner);
this.document.getElementById('smsPhone').value = profilesOb[spI].phone_number;
this.document.getElementById('smsCaptchaCfm').focus();
} else if (profilesOb[spI].way == way.PASS) { // PASS인증을 원하는 경우
if (document.querySelector("#authTab > li.on > a")) {
if (document.querySelector("#authTab > li.on > a").id != 'qr_auth') { //sms아닐때
this.document.getElementById('qr_auth').click();
}
}
this.document.getElementById('pushName').value = profilesOb[spI].name;
this.document.getElementById('pushPhone').value = profilesOb[spI].phone_number;
this.document.getElementById('pushCaptchaCfm').focus();
}
} else if (window.location.hostname == 'kssa.inicis.com') {
log('KG이니시스');
if (this.document.querySelector("#carrier")) {
if (profilesOb[spI].carrier == carrier.SKT) {
var carrierBtn = 'SKT';
} else if (profilesOb[spI].carrier == carrier.KT) {
var carrierBtn = 'KTF';
} else if (profilesOb[spI].carrier == carrier.LGU) {
var carrierBtn = 'LGT';
} else if (profilesOb[spI].carrier == carrier.SKT_MVNO) {
var carrierBtn = 'SKR';
} else if (profilesOb[spI].carrier == carrier.KT_MVNO) {
var carrierBtn = 'KTR';
} else if (profilesOb[spI].carrier == carrier.LGU_MVNO) {
var carrierBtn = 'LGR';
}
this.document.querySelector("#carrier").value = carrierBtn;
}
if (this.document.querySelector("#nation_local")) {
if (profilesOb[spI].foreigner == '0') {
this.document.querySelector("#nation_local").click();
} else {
this.document.querySelector("#nation_foreign").click();
}
}
if (this.document.querySelector("#gender_male")) {
if (profilesOb[spI].gender == '1') {
this.document.querySelector("#gender_male").click();
} else {
this.document.querySelector("#gender_female").click();
}
}
if (this.document.getElementById('name')) {
this.document.getElementById('name').value = profilesOb[spI].name;
}
if (this.document.getElementById('birth')) {
this.document.getElementById('birth').value = profilesOb[spI].birth;
}
if (this.document.getElementById('phone')) {
this.document.getElementById('phone').value = profilesOb[spI].phone_number;
}
if (this.document.getElementById("all_check")) {
this.document.getElementById("all_check").click();
}
if (this.document.getElementById("code")) {
this.document.getElementById("code").focus();
}
} else if (window.location.hostname == 'www.gov.kr') {
log('정부24');
var nameInputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(1) > div.ul-td > input[type=text]";
var birthDate8DigitInputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(2) > div.ul-td > input";
var birthDate6DigitInputQuery = null;
var rrnInputQuery = null;
var phone1InputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(4) > div.ul-td > select:nth-child(2)";
var phone2InputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(4) > div.ul-td > input";
var carrierInputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li.telecom > div.ul-td > select.one-third.mr15";
var agreeInputQuery = "#totalAgree";
autofill_for_mois(selectedProfile, nameInputQuery, birthDate8DigitInputQuery, birthDate6DigitInputQuery, rrnInputQuery, phone1InputQuery, phone2InputQuery, carrierInputQuery, agreeInputQuery);
} else if (window.location.hostname == 'easysign.anyid.go.kr') {
log('행정안전부 ‘Any-ID’ 간편 로그인 서비스');
// PC
var nameInputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(1) > div.ul-td > input[type=text]";
var birthDate8DigitInputQuery = "#oacx_birth";
var birthDate6DigitInputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li.oacx-ssn > div.ul-td > input[type=text]:nth-child(1)";
var rrnInputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li.oacx-ssn > div.ul-td > input[type=password]:nth-child(2)";
var phone1InputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(4) > div.ul-td > select:nth-child(2)";
var phone2InputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(4) > div.ul-td > input";
var carrierInputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li.telecom > div.ul-td > select.one-third.mr15";
var agreeInputQuery = "#totalAgree";
autofill_for_mois(selectedProfile, nameInputQuery, birthDate8DigitInputQuery, birthDate6DigitInputQuery, rrnInputQuery, phone1InputQuery, phone2InputQuery, carrierInputQuery, agreeInputQuery);
// Mobile
var nameInputQuery = "#oacxEmbededContents > div.mobileView > section > ul.userInfo > li:nth-child(1) > div.ul-td > input[type=text]";
var birthDate8DigitInputQuery = null;
var birthDate6DigitInputQuery = "#oacxEmbededContents > div.mobileView > section > ul.userInfo > li.oacx-ssn > div.ul-td > input[type=text]:nth-child(1)";
var rrnInputQuery = "#oacxEmbededContents > div.mobileView > section > ul.userInfo > li.oacx-ssn > div.ul-td > input[type=password]:nth-child(2)";
var phone1InputQuery = "#oacxEmbededContents > div.mobileView > section > ul.userInfo > li:nth-child(4) > div.ul-td > select:nth-child(2)";
var phone2InputQuery = "#oacxEmbededContents > div.mobileView > section > ul.userInfo > li:nth-child(4) > div.ul-td > input";
var carrierInputQuery = "#oacxEmbededContents > div.mobileView > section > ul.userInfo > li:nth-child(4) > div.ul-td > select.one-third.mr15";
var agreeInputQuery = null;
var check_provider = setInterval(function() {
var provider = document.querySelector("#oacxEmbededContents > div.mobileView > section > ul.providerInfo > li > a");
// 인증기관 선택완료시
if (provider && !provider.title.includes('인증기관 선택')) {
var run = autofill_for_mois(selectedProfile, nameInputQuery, birthDate8DigitInputQuery, birthDate6DigitInputQuery, rrnInputQuery, phone1InputQuery, phone2InputQuery, carrierInputQuery, agreeInputQuery);
clearInterval(check_provider);
setTimeout(() => {
clearInterval(run);
this.document.querySelector("#oacxEmbededContents > div.alertArea > div > div.btnArea > button").click();
}, 700);
}
}, 500);
} else if (window.location.hostname == 'efamily.scourt.go.kr') {
log('가족관계등록시스템');
var nameInputQuery = null;
var birthDate8DigitInputQuery = null;
var birthDate6DigitInputQuery = null;
var rrnInputQuery = null;
var phone1InputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(4) > div.ul-td > select:nth-child(2)";
var phone2InputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(4) > div.ul-td > input";
var carrierInputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li.telecom > div.ul-td > select.one-third";
var agreeInputQuery = "#totalAgree";
autofill_for_mois(selectedProfile, nameInputQuery, birthDate8DigitInputQuery, birthDate6DigitInputQuery, rrnInputQuery, phone1InputQuery, phone2InputQuery, carrierInputQuery, agreeInputQuery);
} else if (window.location.hostname == 'www.efine.go.kr') {
log('교통민원24');
var nameInputQuery = "#oacx_name";
var birthDate8DigitInputQuery = null;
var birthDate6DigitInputQuery = "#oacx_num1";
var rrnInputQuery = "#oacx_num2";
var phone1InputQuery = "#submitFm > table > tbody > tr.telecom > td > select:nth-child(2)";
var phone1InputQuery2 = "#oacx_phone1";
var phone2InputQuery = "#oacx_phone3";
var phone2InputQuery2 = "#oacx_phone2";
var carrierInputQuery = "#submitFm > table > tbody > tr.telecom > td > select:nth-child(1)";
var agreeInputQuery = "#oacx_total";
autofill_for_mois(selectedProfile, nameInputQuery, birthDate8DigitInputQuery, birthDate6DigitInputQuery, rrnInputQuery, phone1InputQuery, phone2InputQuery, carrierInputQuery, agreeInputQuery);
autofill_for_mois(selectedProfile, nameInputQuery, birthDate8DigitInputQuery, birthDate6DigitInputQuery, rrnInputQuery, phone1InputQuery2, phone2InputQuery2, carrierInputQuery, agreeInputQuery);
} else if (window.location.hostname == 'www.egroup.go.kr') {
log('기업집단포털');
var nameInputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(1) > div.ul-td > input[type=text]";
var birthDate8DigitInputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(2) > div.ul-td > input";
var birthDate6DigitInputQuery = null;
var rrnInputQuery = null;
var phone1InputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(4) > div.ul-td > select:nth-child(2)";
var phone2InputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(4) > div.ul-td > input";
var carrierInputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li.telecom > div.ul-td > select.one-third.mr15";
var agreeInputQuery = "#policy4";
autofill_for_mois(selectedProfile, nameInputQuery, birthDate8DigitInputQuery, birthDate6DigitInputQuery, rrnInputQuery, phone1InputQuery, phone2InputQuery, carrierInputQuery, agreeInputQuery);
} else if (window.location.hostname == 'www.icl.go.kr') {
log('학자금상환 시스템');
var nameInputQuery = "#oacx_name";
var birthDate8DigitInputQuery = "#oacx_birth";
var birthDate6DigitInputQuery = null;
var rrnInputQuery = null;
var phone1InputQuery = "#submitFm > table > tbody > tr:nth-child(4) > td > select:nth-child(2)";
var phone2InputQuery = "#oacx_phone3";
var carrierInputQuery = "#submitFm > table > tbody > tr:nth-child(4) > td > select:nth-child(1)";
var agreeInputQuery = "#oacx_total";
autofill_for_mois(selectedProfile, nameInputQuery, birthDate8DigitInputQuery, birthDate6DigitInputQuery, rrnInputQuery, phone1InputQuery, phone2InputQuery, carrierInputQuery, agreeInputQuery);
} else if (window.location.hostname == 'minwon.moj.go.kr') {
log('법무부 온라인민원서비스');
var nameInputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(1) > div.ul-td > input[type=text]";
var birthDate8DigitInputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(2) > div.ul-td > input";
var birthDate6DigitInputQuery = null;
var rrnInputQuery = null;
var phone1InputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(4) > div.ul-td > select:nth-child(2)";
var phone2InputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(4) > div.ul-td > input";
var carrierInputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(4) > div.ul-td > select.one-third.mr15";
var agreeInputQuery = "#totalAgree";
autofill_for_mois(selectedProfile, nameInputQuery, birthDate8DigitInputQuery, birthDate6DigitInputQuery, rrnInputQuery, phone1InputQuery, phone2InputQuery, carrierInputQuery, agreeInputQuery);
} else if (window.location.hostname == 'www.kosaf.go.kr') {
log('한국장학재단');
var nameInputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(1) > div.ul-td > input[type=text]";
var birthDate8DigitInputQuery = null;
var birthDate6DigitInputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li.oacx-ssn > div.ul-td > input[type=text]:nth-child(1)";
var rrnInputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li.oacx-ssn > div.ul-td > input[type=password]:nth-child(2)";
var phone1InputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(4) > div.ul-td > select:nth-child(2)";
var phone2InputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(4) > div.ul-td > input";
var carrierInputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(4) > div.ul-td > select.one-third.mr15";
var agreeInputQuery = "#totalAgree";
autofill_for_mois(selectedProfile, nameInputQuery, birthDate8DigitInputQuery, birthDate6DigitInputQuery, rrnInputQuery, phone1InputQuery, phone2InputQuery, carrierInputQuery, agreeInputQuery);
} else if (window.location.hostname == 'www.epost.go.kr') {
log('인터넷우체국');
var nameInputQuery = "#oacx_name";
var birthDate8DigitInputQuery = "#oacx_birth";
var birthDate6DigitInputQuery = null;
var rrnInputQuery = null;
var phone1InputQuery = "#oacx_phone1";
var phone1InputQuery2 = "#submitFm > table > tbody > tr.telecom > td > select:nth-child(2)";
var phone2InputQuery = "#oacx_phone2";
var phone2InputQuery2 = "#oacx_phone3";
var carrierInputQuery = "#submitFm > table > tbody > tr.telecom > td > select:nth-child(1)";
var agreeInputQuery = "#oacx_total";
autofill_for_mois(selectedProfile, nameInputQuery, birthDate8DigitInputQuery, birthDate6DigitInputQuery, rrnInputQuery, phone1InputQuery, phone2InputQuery, carrierInputQuery, agreeInputQuery);
autofill_for_mois(selectedProfile, nameInputQuery, birthDate8DigitInputQuery, birthDate6DigitInputQuery, rrnInputQuery, phone1InputQuery2, phone2InputQuery2, carrierInputQuery, agreeInputQuery);
} else if (window.location.hostname == 'www.epeople.go.kr') {
log('국민신문고');
var nameInputQuery = "#oacx_name";
var birthDate8DigitInputQuery = null;
var birthDate6DigitInputQuery = "#oacx_num1";
var rrnInputQuery = "#oacx_num2";
var phone1InputQuery = "#oacx_phone1";
var phone1InputQuery2 = "#submitFm > table > tbody > tr.telecom > td > select:nth-child(2)";
var phone2InputQuery = "#oacx_phone2";
var phone2InputQuery2 = "#oacx_phone3";
var carrierInputQuery = "#submitFm > table > tbody > tr.telecom > td > select:nth-child(1)";
var agreeInputQuery = "#oacx_total";
autofill_for_mois(selectedProfile, nameInputQuery, birthDate8DigitInputQuery, birthDate6DigitInputQuery, rrnInputQuery, phone1InputQuery, phone2InputQuery, carrierInputQuery, agreeInputQuery);
autofill_for_mois(selectedProfile, nameInputQuery, birthDate8DigitInputQuery, birthDate6DigitInputQuery, rrnInputQuery, phone1InputQuery2, phone2InputQuery2, carrierInputQuery, agreeInputQuery);
} else if (window.location.hostname == 'cert.mma.go.kr') {
log('병무민원');
var nameInputQuery = null;
var birthDate8DigitInputQuery = null;
var birthDate6DigitInputQuery = null;
var rrnInputQuery = null;
var phone1InputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(4) > div.ul-td > select:nth-child(2)";
var phone2InputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li:nth-child(4) > div.ul-td > input";
var carrierInputQuery = "#oacxEmbededContents > div:nth-child(2) > div > div.formLayout > section > form > div.tab-content > div:nth-child(1) > ul > li.telecom > div.ul-td > select.one-third.mr15";
var agreeInputQuery = "#totalAgree";