This commit is contained in:
fred 2023-12-15 18:31:06 +01:00
parent f417552c1d
commit d0af6133ee
4 changed files with 167 additions and 3 deletions

View File

@ -117,7 +117,7 @@
<body> <body>
<h1>♥ U Planet ♥</h1> <h1>♥ U Planet ♥</h1>
<a href="login/">ACCESS</a> <a href="scan/">SCAN</a>
<div id="container"> <div id="container">
<br><br> <br><br>
@ -160,7 +160,7 @@
--> -->
<button style="position: fixed; top: 10px; left: 10px;" onclick="document.getElementById('console').style.visibility = (document.getElementById('console').style.visibility === 'visible' ? 'hidden' : 'visible');">(?)</button> <button style="position: fixed; top: 10px; left: 10px;" onclick="document.getElementById('console').style.visibility = (document.getElementById('console').style.visibility === 'visible' ? 'hidden' : 'visible');">(?)</button>
<div id="console"> ___ <a href="https://zen.g1sms.fr" target="aframe">Discover ẐenCard</a> ___ <button onclick="document.getElementById('console').style.visibility = 'hidden';"> X </button> <div id="console"> <a href="https://pad.p2p.legal/p/UPlanet_HELP" target="aframe">HELP</a> ___ <a href="https://zen.g1sms.fr" target="aframe">Discover Ẑen</a> ___ <button onclick="document.getElementById('console').style.visibility = 'hidden';"> X </button>
<iframe name="aframe" id="aframe" src="https://pad.p2p.legal/p/UPlanet_HELP" width="100%" height="100%"></iframe> <iframe name="aframe" id="aframe" src="https://pad.p2p.legal/p/UPlanet_HELP" width="100%" height="100%"></iframe>
</div> </div>

View File

@ -364,7 +364,7 @@ loadGridNumbers(zoneURL).then(gridNumbers => {
// Add an event listener to the button // Add an event listener to the button
button.addEventListener('click', function() { button.addEventListener('click', function() {
window.open( ipns , "AstroTab"); window.open( ipns , "_new");
}); });
// Append the button to the button container // Append the button to the button container

BIN
earth/scan/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

164
earth/scan/index.html Normal file
View File

@ -0,0 +1,164 @@
<!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>