2023-03-09 19:42:41 +01:00
< html >
< head >
< meta charset = "utf-8" >
< meta http-equiv = "content-type" content = "text/html; charset=UTF-8" >
2023-03-12 22:31:11 +01:00
< link rel = "icon" type = "image/x-icon" href = "http://127.0.0.1:8080/ipfs/QmQLQ5WdCEc7mpKw5rhUujUU1URKweei4Bb4esyVNd9Atx/favicon.ico" >
2023-04-07 13:22:28 +02:00
< title > ♥Box Ğ1Station - Astroport Ŋ1 - < / title >
2023-03-12 22:31:11 +01:00
< link rel = "stylesheet" href = "http://127.0.0.1:8080/ipfs/QmQLQ5WdCEc7mpKw5rhUujUU1URKweei4Bb4esyVNd9Atx/G1PalPay_fichiers/demo.css" >
2023-03-26 00:24:25 +01:00
< script src = "http://127.0.0.1:8080/ipfs/QmYD4y1pXHVnGxxFcn2LWo84ytwmWdNbkyUeFnPCbrpUQy/openpgp.min.js" > < / script >
2023-04-06 17:20:41 +02:00
< script src = "http://127.0.0.1:8080/ipfs/QmYjUbg8NzsXxkYV5NnK2rwv38VGd5z8dhxr3zEph6qFQM/astro.js" > < / script >
2023-03-12 22:31:11 +01:00
< script src = "http://127.0.0.1:8080/ipfs/QmQLQ5WdCEc7mpKw5rhUujUU1URKweei4Bb4esyVNd9Atx/G1PalPay_fichiers/jquery-3.6.3.min.js" > < / script >
< script src = "http://127.0.0.1:8080/ipfs/QmQLQ5WdCEc7mpKw5rhUujUU1URKweei4Bb4esyVNd9Atx/G1PalPay_fichiers/instascan.min.js" > < / script >
2023-03-10 00:57:16 +01:00
< link rel = "stylesheet" href = "http://127.0.0.1:8080/ipfs/QmaCh8mywWfxkXF3JziFzqZS6yZFo3eNS5fSfnzJqdSQvX/decoration.css" type = "text/css" / >
< link rel = "stylesheet" href = "http://127.0.0.1:8080/ipfs/QmaCh8mywWfxkXF3JziFzqZS6yZFo3eNS5fSfnzJqdSQvX/layout.css" type = "text/css" / >
2023-03-09 19:42:41 +01:00
< style >
body {
2023-03-10 00:57:16 +01:00
background-image:url("http://127.0.0.1:8080/ipfs/QmSFgatcq3q898J56epa8SyGbH651vRBFnv93kQSwfoi83/background.014.jpg");
2023-03-09 19:42:41 +01:00
background-repeat: no-repeat;
background-size: 100% 100%;
padding: 0;
margin: 0;
font-family: sans-serif;
}
html {
height: 100%
}
header {
opacity: 0.8;
}
input[type=submit] {
width: 12em; height: 4em;
}
input[type=checkbox] {
width: 2em; height: 2em;
}
input {
width: 26em; height: 2em;
}
2023-04-04 17:05:10 +02:00
#aframe {
background: white;
color: black;
}
2023-03-09 19:42:41 +01:00
#yellow {
2023-03-10 00:57:16 +01:00
background: black;
2023-04-04 17:05:10 +02:00
color: white;
2023-03-09 19:42:41 +01:00
position: absolute;
2023-03-10 00:57:16 +01:00
bottom: 2%;
left: 2%;
width: 800px;
2023-03-09 19:42:41 +01:00
visibility: hidden;
}
h1 {
margin-top: 10px;
font-size: 40px;
margin-bottom: 10px;
}
.subtitle {
font-size: 20px;
margin-bottom: 20px;
color: #777;
}
a {
color: white;
}
#demo {
overflow: hidden;
}
#description {
text-align: left;
float: left;
width: 49%;
max-width: 500px;
2023-03-15 20:35:10 +01:00
padding-top: 15px;
2023-03-09 19:42:41 +01:00
padding-left: 20px;
}
#showoff {
float: right;
width: 30%;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
#container {
2023-03-15 20:35:10 +01:00
top: 120px;
right: 0px;
position: absolute;
2023-03-09 19:42:41 +01:00
display: inline-block;
width: 400px;
height: 400px;
}
< / style >
2023-03-02 23:48:47 +01:00
< / head >
< body >
2023-03-09 19:42:41 +01:00
< div id = "demo" >
< div id = "description" >
2023-04-07 13:22:28 +02:00
< header >
< h1 > < a href = "http://astroport.localhost:1234" > < span > ♥Box< / span > Ğ1Station< / a > < / h1 > < br >
< / header >
2023-04-04 17:05:10 +02:00
< h2 > N'attendez pas la Retraite !< / h2 >
< h3 > Oubliez la crise... < / h3 >
2023-04-04 20:33:01 +02:00
< h2 > Utilisez la Monnaie Libre.< / h2 >
2023-04-04 17:05:10 +02:00
< h3 > Explorez le Monde Autrement. < / h3 >
2023-03-09 19:42:41 +01:00
< / div >
< / div >
< div id = "showoff" >
< div id = "container" >
2023-03-02 23:48:47 +01:00
2023-03-18 14:55:45 +01:00
< video id = "preview" style = "transform: scaleX(-1);width: 240px;height: 240px;" autoplay = "autoplay" class = "active" > < / video >
< strong > < div id = "countdown" > < / div > < / strong >
2023-03-28 19:53:57 +02:00
< div id = "appname" >
2023-03-31 18:49:40 +02:00
< input type = "radio" id = "r1" name = "appname" value = "read" > Messagerie
2023-03-28 19:53:57 +02:00
< input type = "radio" id = "r2" name = "appname" value = "history" > Historique
< input type = "radio" id = "r3" name = "appname" value = "pay" checked = "checked" > Payer
< / div >
2023-03-26 19:53:57 +02:00
< strong > < div id = "resu" > < / div > < / strong >
2023-03-13 05:14:51 +01:00
< p > < strong > Scannez QRCode< / strong > < / p >
2023-04-07 13:33:20 +02:00
< p > < a target = "g1billet" href = "https://g1sms.fr/fr/g1billet" > G1BILLET< / a > destinataire< / p >
< p > puis votre < a target = "g1pass" href = "https://g1sms.fr/fr/g1billet" > G1PASS< / a > < / p >
< p > fonctionne < br > avec tout "< a target = "cesium" href = "https://cesium.app/fr/fonctionnalites" > portefeuille< / a > " < a target = "cesium" href = "https://cesium.app/fr/telechargement" > Cesium< / a > < / p >
2023-03-09 19:42:41 +01:00
< / div >
< / div >
2023-03-02 23:48:47 +01:00
< script type = "text/javascript" >
2023-03-10 00:57:16 +01:00
async function fetchAstroport(myURL) {
try {
2023-03-13 18:50:20 +01:00
let one = await fetch(myURL); // Gets a promise
var doc = await one.text();
var regex = /url='([^']+)/i; // Get response PORT
var redirectURL = doc.match(regex)[1]
2023-03-10 00:57:16 +01:00
2023-03-13 18:50:20 +01:00
console.log(redirectURL)
2023-03-10 00:57:16 +01:00
2023-03-13 18:50:20 +01:00
// start countdown
var timeLeft = 20;
var elem = document.getElementById("countdown");
var timerId = setInterval(countdown, 1000);
2023-03-13 04:26:59 +01:00
2023-03-13 18:50:20 +01:00
function countdown() {
if (timeLeft == -1) {
clearTimeout(timerId);
2023-03-10 00:57:16 +01:00
window.open( redirectURL, "AstroTab");
2023-03-13 18:50:20 +01:00
} else {
elem.innerHTML = timeLeft + " s";
timeLeft--;
}
}
2023-03-10 00:57:16 +01:00
} catch (err) {
console.log('Fetch error:' + err); // Error handling
}
}
2023-03-02 23:48:47 +01:00
let scanner = new Instascan.Scanner({ video: document.getElementById('preview') });
2023-03-10 00:57:16 +01:00
2023-03-02 23:48:47 +01:00
scanner.addListener('scan', function (content) {
2023-03-13 18:50:20 +01:00
alert(content);
2023-03-28 16:07:54 +02:00
if (content.startsWith('~~~~~')) {
2023-03-28 19:53:57 +02:00
// GET PASS THAT DECODE PGP
var pass = prompt("Saisir PASS:");
// GET APPNAME
var appname = document.querySelector('input[name="appname"]:checked').value;
// DEFAULT PAY
if ( appname == 'pay') {
var amount = prompt("Saisir MONTANT Ğ1:");
}
// DESTINATION WAS PREVIOUS SCAN
2023-03-28 16:07:54 +02:00
if (document.getElementById("resu").innerHTML !== '') {
var mypub = document.getElementById("resu").innerHTML.value;
} else {
2023-03-28 19:53:57 +02:00
// OR IF NONE Fred ;)
2023-03-28 16:07:54 +02:00
var mypub = "DsEx1pS33vzYZg4MroyBV9hCw98j1gtHEhwiZ5tK7ech"
}
2023-03-28 19:53:57 +02:00
var myU = 'http://astroport.localhost:1234/?qrcode=' + content +'& pass=' + pass + '& ' + appname + '=' + amount + '& g1pub=' + mypub ;
2023-03-31 18:57:16 +02:00
console.log(myU);
homeAstroportStation(myU, 'aframe', 10000)
2023-03-26 00:24:25 +01:00
} else {
2023-03-26 19:53:57 +02:00
document.getElementById("resu").innerHTML = content;
2023-03-26 00:24:25 +01:00
var myU = 'http://astroport.localhost:1234/?qrcode=' + content;
2023-03-31 18:57:16 +02:00
console.log(myU);
homeAstroportStation(myU, 'aframe', 5000)
2023-03-26 00:24:25 +01:00
}
2023-03-31 18:57:16 +02:00
2023-03-28 16:07:54 +02:00
// fetchAstroport(myU)
2023-03-26 03:50:17 +02:00
2023-03-02 23:48:47 +01:00
});
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 >
2023-03-28 16:07:54 +02:00
< h1 > < button id = "ainfo" onclick = "javascript:var x = document.getElementById('yellow'); if (x.style.visibility === 'hidden') {x.style.visibility = 'visible';} else {x.style.visibility = 'hidden';}" > 0/1< / button > < / h1 >
< div id = "yellow" > < a href = "_STATION_" target = "aframe" > Menu< / a >
2023-03-19 15:11:43 +01:00
< iframe name = "aframe" id = "aframe" src = "_STATION_" width = "100%" height = "300px" > < / iframe >
2023-03-10 00:57:16 +01:00
< / div >
2023-03-09 19:42:41 +01:00
2023-03-10 00:57:16 +01:00
< script >
2023-03-27 17:26:19 +02:00
let cookies = document.cookie;
console.log(cookies);
2023-03-10 00:57:16 +01:00
const el = document.getElementById('yellow');
2023-03-02 23:48:47 +01:00
2023-03-10 00:57:16 +01:00
setTimeout(() => {
el.style.visibility = 'visible';
2023-03-22 16:48:15 +01:00
}, 3000); // 👈️ delay in milliseconds
2023-03-10 00:57:16 +01:00
< / script >
2023-03-02 23:48:47 +01:00
2023-03-08 17:00:53 +01:00
< / body > < / html >