2023-02-27 19:17:24 +01:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html>
|
|
|
|
|
<head>
|
2023-02-27 18:27:30 +01:00
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
<link rel="icon" type="image/x-icon" href="https://ipfs.copylaradio.com/ipfs/QmNwECbSL6xihpS2QLpts8a8Boekk3rEVGeySuzg83jTDA/favicon.ico">
|
|
|
|
|
<title>Astroport.ONE - SAVE PLANET EARTH - IPFS / La<3BOX / IRL GAMING made by LaSTI /</title>
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="/ipfs/QmVuJCKVp57b3HzwDRAoURonaFwWTwvoqq2Am2JoSQhdPz/index_fichiers/demo.css">
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript" src="/ipfs/QmVuJCKVp57b3HzwDRAoURonaFwWTwvoqq2Am2JoSQhdPz/index_fichiers/jquery-3.6.3.min.js"></script>
|
|
|
|
|
<script type="text/javascript" src="/ipfs/QmVuJCKVp57b3HzwDRAoURonaFwWTwvoqq2Am2JoSQhdPz/index_fichiers/instascan.min.js"></script>
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
2023-02-27 19:17:24 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h1>SCANNEZ VOTRE QRCODE (<a href="https://cesium.app" target=_blank>CESIUM</a>)</h1>
|
|
|
|
|
|
|
|
|
|
<div class="subtitle">Pr<EFBFBD>sentez votre "G1Key"<br>Passeport TERRE</div>
|
|
|
|
|
<div id="demo">
|
|
|
|
|
<div id="description">
|
2023-02-27 18:27:30 +01:00
|
|
|
|
<center>
|
|
|
|
|
|
|
|
|
|
<video id="preview" style="transform: scaleX(-1);width: 240px;height: 240px;" autoplay="autoplay" class="active"></video>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2023-02-27 19:17:24 +01:00
|
|
|
|
// BORIS STUFF COMES HERE
|
|
|
|
|
function cacheIt (appName, hash, nodeId = '') {
|
|
|
|
|
|
|
|
|
|
var gatewayProtocol = 'http';
|
|
|
|
|
|
|
|
|
|
var gatewayDomain = 'ipfs.localhost';
|
|
|
|
|
|
|
|
|
|
var gatewayPort = '1234';
|
|
|
|
|
|
|
|
|
|
var salt = 'totodu56';
|
|
|
|
|
var pepper = 'totodu56';
|
|
|
|
|
|
|
|
|
|
var query = 'salt='+ salt
|
|
|
|
|
query += '&pepper='+ pepper
|
|
|
|
|
query += '&' + appName
|
|
|
|
|
query += '&nodeid=' + nodeId
|
|
|
|
|
query += '&dataid=' + hash;
|
|
|
|
|
|
|
|
|
|
var fullURL = 'http://'+ gatewayDomain +':'+ gatewayPort + '/?' + query;
|
|
|
|
|
console.log(fullURL)
|
|
|
|
|
|
|
|
|
|
const controller = new AbortController()
|
|
|
|
|
const timeoutId = setTimeout( () => {
|
|
|
|
|
controller.abort()
|
|
|
|
|
}, 15000)
|
|
|
|
|
var fetchOpts = {
|
|
|
|
|
method: 'GET',
|
|
|
|
|
headers: {
|
|
|
|
|
'Accept': 'text/html'
|
|
|
|
|
// ,'Content-Type': 'text/html'
|
|
|
|
|
// // ,'Access-Control-Allow-Origin': '*',
|
|
|
|
|
// ,'Origin': 'la-bureautique'
|
|
|
|
|
// ,'Referrer-Policy': 'unsafe-url'
|
|
|
|
|
// ,'Redirect': 'manual'
|
|
|
|
|
},
|
|
|
|
|
signal: controller.signal
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fetch(fullURL, fetchOpts)
|
|
|
|
|
.then(reponse => {
|
|
|
|
|
return reponse.text()
|
|
|
|
|
})
|
|
|
|
|
.then(html => {
|
|
|
|
|
// console.log(html)
|
|
|
|
|
|
|
|
|
|
var regex = /url='([^']+)/i;
|
|
|
|
|
var redirectURL = html.match(regex)[1]
|
|
|
|
|
|
|
|
|
|
return redirectURL
|
|
|
|
|
})
|
|
|
|
|
.then(url => {
|
|
|
|
|
|
|
|
|
|
console.log(url)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// JSON.stringify(json)
|
|
|
|
|
}
|
|
|
|
|
// BORIS STUFF COMES HERE
|
2023-02-27 18:27:30 +01:00
|
|
|
|
|
|
|
|
|
let scanner = new Instascan.Scanner({ video: document.getElementById('preview') });
|
|
|
|
|
scanner.addListener('scan', function (content) {
|
|
|
|
|
alert(content);
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "http://astroport.localhost:1234",
|
|
|
|
|
data: "qrcode="+content,
|
|
|
|
|
type: 'GET'
|
|
|
|
|
});
|
|
|
|
|
//
|
2023-02-27 19:17:24 +01:00
|
|
|
|
|
2023-02-27 18:27:30 +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>
|
|
|
|
|
|
|
|
|
|
<h2> - Activez votre Capsule IPFS - </h2>
|
|
|
|
|
</center>
|
|
|
|
|
|
2023-02-27 19:17:24 +01:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2023-02-27 18:27:30 +01:00
|
|
|
|
</body></html>
|