165 lines
5.4 KiB
HTML
165 lines
5.4 KiB
HTML
|
<!doctype html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||
|
<link rel="icon" type="image/x-icon" href="/ipfs/QmUuSv5rZjatksqSzg16UdJQYfEoCWQozNhiM35FKuE7r8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
|
<script src="/ipfs/QmQLQ5WdCEc7mpKw5rhUujUU1URKweei4Bb4esyVNd9Atx/G1PalPay_fichiers/jquery-3.6.3.min.js"></script>
|
||
|
<script src="/ipfs/QmQLQ5WdCEc7mpKw5rhUujUU1URKweei4Bb4esyVNd9Atx/G1PalPay_fichiers/instascan.min.js"></script>
|
||
|
<title>ẐenCard scanner</title>
|
||
|
<style>
|
||
|
html,* { font-family: 'Inter'; box-sizing: border-box; }
|
||
|
body { background-color: #fafafa; line-height:1.6;}
|
||
|
.lead { font-size: 1.5rem; font-weight: 300;background: linear-gradient(to right, #000000 0%, #000000 50%,#999999 100%);
|
||
|
-webkit-background-clip: text;
|
||
|
-webkit-text-fill-color:transparent; }
|
||
|
.container { margin: 10px auto; max-width: 960px; }
|
||
|
.reset{ position: absolute; padding: 1.1rem; border:0; border-radius:35px; background-color:#4F46E5; color:#fff;cursor:pointer; text-decoration:none;}
|
||
|
.reset:hover{color: #fff}#carbonads{display:block;overflow:hidden;max-width:728px;position:relative;font-size:18px;box-sizing:content-box}
|
||
|
#terminal {
|
||
|
background-color: #746;
|
||
|
padding: 5px;
|
||
|
border-radius: 199px;
|
||
|
box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
|
||
|
}
|
||
|
#video-container {
|
||
|
width: 100%;
|
||
|
max-width: 180px;
|
||
|
max-height: 180px;
|
||
|
margin: 0 auto 20px;
|
||
|
border: 2px solid #ccc;
|
||
|
border-radius: 5px;
|
||
|
overflow: hidden;
|
||
|
}
|
||
|
#preview {
|
||
|
width: 100%;
|
||
|
height: auto;
|
||
|
transform: scaleX(-1);
|
||
|
}
|
||
|
#password {
|
||
|
margin-top: 20px;
|
||
|
font-size: 18px;
|
||
|
text-align: center;
|
||
|
padding: 10px;
|
||
|
border: 1px solid #ccc;
|
||
|
border-radius: 5px;
|
||
|
}
|
||
|
#zenpub {
|
||
|
margin-top: 20px;
|
||
|
font-size: 18px;
|
||
|
}
|
||
|
#received {
|
||
|
margin-top: 20px;
|
||
|
font-size: 8px;
|
||
|
}
|
||
|
#zencard {
|
||
|
margin-top: 20px;
|
||
|
font-size: 18px;
|
||
|
}
|
||
|
#message {
|
||
|
margin-top: 20px;
|
||
|
font-size: 18px;
|
||
|
}
|
||
|
</style>
|
||
|
<link rel="stylesheet" href="/ipfs/QmQdTMLX6xUXHYP9RHbkGf7v2jvn8JjwDSHnyKJqaVreQy/pinMeBB.css">
|
||
|
<script src="/ipfs/QmQdTMLX6xUXHYP9RHbkGf7v2jvn8JjwDSHnyKJqaVreQy/pinMeBB.js"></script>
|
||
|
<script>
|
||
|
$(document).ready(function () {
|
||
|
var pinform = pinMeBB("pinpad", { limit: 5, minChar: 4 });
|
||
|
pinform.addEventListener("onEnter", (e) => {
|
||
|
// when pres enter
|
||
|
var pin = e.detail.password();
|
||
|
alert("Enter Pressed! \n Pin : "+pin);
|
||
|
});
|
||
|
pinform.addEventListener("onMaxChar", (e) => {
|
||
|
//when max length reached
|
||
|
var pin = e.detail.password();
|
||
|
alert("MAXED Char Reached! \n Pin : "+pin);
|
||
|
});
|
||
|
pinform.addEventListener("onEmpty", (e) => {
|
||
|
//when some pin still missing (default min Char is the same as limit)
|
||
|
alert("Pin Cant be Empty!");
|
||
|
});
|
||
|
});
|
||
|
</script>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div class="container">
|
||
|
|
||
|
<div id="terminal">
|
||
|
<p>
|
||
|
<a class="reset" href="#">RESET</a>
|
||
|
</p>
|
||
|
<div id="video-container">
|
||
|
<video id="preview" style="transform: scaleX(-1);width: 180px;height: 180px;" autoplay="autoplay" class="active"></video>
|
||
|
<div id="message">Scan AstroID / ZenCard</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="pinpad"></div>
|
||
|
|
||
|
<p class="lead">
|
||
|
Enter PIN code, after scanning your ZenCard AstroID to verify identity.
|
||
|
</p>
|
||
|
<div id="password">PASS</div>
|
||
|
<div id="received">CONTENT</div>
|
||
|
<div id="zenpub">ZENPUB</div>
|
||
|
<div id="zencard">ZENCARD</div>
|
||
|
|
||
|
</div>
|
||
|
<script>
|
||
|
|
||
|
////////////////////// ACTIVATE WEBCAM QRCODE SCANNER
|
||
|
let scanner = new Instascan.Scanner({ video: document.getElementById('preview') });
|
||
|
|
||
|
scanner.addListener('scan', function (content) {
|
||
|
|
||
|
document.getElementById("received").innerText = content;
|
||
|
|
||
|
if (content.startsWith('~~~~~')) {
|
||
|
// STORE ZENCARD
|
||
|
document.getElementById('received').innerText = "";
|
||
|
document.getElementById("zencard").innerText = content;
|
||
|
|
||
|
var zenpub = document.getElementById("zenpub").innerText;
|
||
|
|
||
|
// Overlay BIG text: "PLEASE ENTER PASS" for 2 seconds
|
||
|
document.getElementById('password').innerText = "PLEASE ENTER PASS";
|
||
|
setTimeout(() => {
|
||
|
document.getElementById('password').innerText = "";
|
||
|
}, 2000);
|
||
|
|
||
|
document.getElementById('keypad').style.visibility = 'visible'
|
||
|
}
|
||
|
|
||
|
if (content.endsWith(':ZEN')) {
|
||
|
|
||
|
document.getElementById('received').innerText = "";
|
||
|
document.getElementById("zenpub").innerText = content;
|
||
|
|
||
|
}
|
||
|
|
||
|
});
|
||
|
|
||
|
Instascan.Camera.getCameras().then(function (cameras) {
|
||
|
|
||
|
if (cameras.length > 0) {
|
||
|
|
||
|
scanner.start(cameras[0]);
|
||
|
|
||
|
} else {
|
||
|
|
||
|
console.error('No cameras found.');
|
||
|
|
||
|
}
|
||
|
|
||
|
}).catch(function (e) {
|
||
|
|
||
|
console.error(e);
|
||
|
|
||
|
});
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|