mirror of
https://github.com/amark/gun.git
synced 2026-02-27 13:43:22 +00:00
29 lines
900 B
HTML
29 lines
900 B
HTML
<html>
|
|
<head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
|
|
<script src="../gun.js"></script>
|
|
<script src="../lib/nts.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="now" style="text-align: center; font-size: 10vmin; line-height: 95vh;">
|
|
Hello!
|
|
</div>
|
|
<script>
|
|
var gun = Gun('http://localhost:8080/gun');
|
|
var $now = $('#now');
|
|
|
|
window.frame = function(cb){
|
|
var requestAnimationFrame = window.requestAnimationFrame || function(cb){setTimeout(cb,0)}
|
|
requestAnimationFrame(cb);
|
|
}
|
|
window.frame(function frame(){
|
|
//window.frame(frame);
|
|
var d = new Date()
|
|
var s = d.getFullYear() + '/' + (d.getMonth() + 1) + '/' + d.getDate() + '/' +
|
|
(d.getHours() + 1) + ':' + d.getSeconds() + '.' + d.getMilliseconds();
|
|
$now.text(s);
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |