spee.ch/public/claim.html

28 lines
888 B
HTML
Raw Normal View History

2017-05-25 07:50:02 +02:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Spee.ch Claim</title>
</head>
<body>
<h1>spee.ch</h1>
<p>spee.ch is a single-serving site that reads and publishes images to and from the <a href="https://lbry.io">LBRY</a> blockchain.</p>
<h3>Status:</h3>
<p id="status">your image is being retrieved</p>
<script src="/socket.io/socket.io.js"></script>
<script>
var socket = io();
console.log(document.URL)
var url = document.URL.substring(document.URL.indexOf('3000/') + 5); // get from the window?
// request the image through the socket
socket.emit("image-request", url);
// receive the image through the socket
socket.on("image-send", function(data){
console.log("data", data);
})
</script>
</body>
</html>