forked from hush/hush.is
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
298 lines
13 KiB
298 lines
13 KiB
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<!-- Basic -->
|
|
<meta charset="utf-8">
|
|
<title>Hush: Next Hardfork</title>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<!-- Favicons -->
|
|
<link rel="shortcut icon" href="/favicon.ico">
|
|
<link rel="apple-touch-icon-precomposed" href="/images/icons/favicon.png">
|
|
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/images/icons/favicon@2x.png">
|
|
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/images/icons/favicon-72.png">
|
|
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/images/icons/favicon-72@2x.png">
|
|
<link rel="apple-touch-icon-precomposed" sizes="60x60" href="/images/icons/favicon-60.png">
|
|
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="/images/icons/favicon-60@2x.png">
|
|
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="/images/icons/favicon-76.png">
|
|
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="/images/icons/favicon-76@2x.png">
|
|
|
|
<!-- Styles -->
|
|
<link rel="stylesheet" href="/css/bootstrap.min.css">
|
|
<link rel="stylesheet" href="/css/styles.css">
|
|
|
|
<meta http-equiv="refresh" content="120; URL=https://hush.is/hardfork">
|
|
</head>
|
|
<body data-spy="scroll" data-target=".navbar" data-offest="120">
|
|
<!-- Navbar -->
|
|
<nav class="navbar navbar-default navbar-fixed-top">
|
|
<div class="container">
|
|
<div class="navbar-header">
|
|
<!--Mobile menu icon -->
|
|
<div class="container navbar-toggle collapsed" data-toggle="collapse" data-target="#menuicon" aria-expanded="true" role="button">
|
|
<div class="bar1"></div>
|
|
<div class="bar2"></div>
|
|
<div class="bar3"></div>
|
|
</div>
|
|
<a class="navbar-brand" href="../index.html" data-value="home-section">
|
|
<img src="/images/logo-nav.png" alt="Logo">
|
|
</a>
|
|
</div>
|
|
<!-- Bootstrap Navbar No Mobile -->
|
|
<div class="collapse navbar-collapse" id="menuicon">
|
|
<ul class="nav navbar-nav navbar-right">
|
|
<li class="dropdown">
|
|
<a class="trlangREMOVED" href="javascript:;"> <i class="fa fa-cog"></i> </a>
|
|
<ul class="dropdown-content-lang">
|
|
<li>
|
|
<a class="english" id="english" href="javascript:;" onclick="testch(this.id)">
|
|
English
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<div id="seconds_until_hardfork" style="display:none;">0</div>
|
|
<!-- DEBUG Seconds until hardfork: <div id="seconds_until_hardfork">0</div> -->
|
|
|
|
<!-- Home Section -->
|
|
<section class="home-section" id="home-section">
|
|
<div class="display-table">
|
|
<div class="display-table-cell">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<h1 class="halving1lang"> Hush consensus hardfork in :</h1>
|
|
<p>
|
|
<h2 class="halving3lang" id="days_until_hardfork"><noscript>Thank you for activating your JavaScript, lulz. We don't like it any more than you do.</noscript></h2>
|
|
<h2 class="halving4lang" id="date_hardfork"> </h2>
|
|
|
|
<font color=red>
|
|
<h3 id="blocks_left"> </h3>
|
|
</font>
|
|
</p>
|
|
</div>
|
|
<br>
|
|
<a class="btn btn-hush hl4lang" href="https://hush.is/releases/3.10.0/" target="_blank">3.10.0 "Sassy Siphonophore"</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="contact-section" id="contact-section">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-sm-8 col-sm-offset-2">
|
|
<div class="title"><h3 class="con1lang">Join us!</h3></div>
|
|
<p><strong class="con2alang">Hush</strong><span class="con2blang"> is a community project. Everyone is welcomed with open arms!</span></p>
|
|
<div class="contact-text">
|
|
<ul>
|
|
<li><a class="telegram" href="//hush.is/telegram" target="_blank" data-toggle="tooltip" title="Telegram"><img src="/images/Telegram_grey.png" alt="Telegram" height="45px" width="45px"/></a></li>
|
|
<li><a class="matrix" href="//hush.is/matrix" target="_blank" data-toggle="tooltip" title="Matrix"><img src="/images/Matrix.png" alt="Matrix" height="45px" width="45px"/></a></li>
|
|
<!--
|
|
<li><a class="twitter" href="//hush.is/twitter" target="_blank" data-toggle="tooltip" title="Twitter"><img src="/images/Twitter_grey.png" alt="Twitter" height="45px" width="45px"/></a></li>
|
|
-->
|
|
<li><a class="mastodon" href="//hush.is/mastodon" target="_blank" data-toggle="tooltip" title="Mastodon"><img src="/images/Mastodon.png" alt="Mastodon" height="45px" width="45px"/></a></li>
|
|
<li><a class="reddit" href="//hush.is/reddit" target="_blank" data-toggle="tooltip" title="Reddit"><img src="/images/reddit_grey.png" alt="Reddit" height="45px" width="45px"/></a></li>
|
|
<li><a class="btc" href="//bitcointalk.org/index.php?topic=2008578.0" target="_blank" data-toggle="tooltip" title="Bitcointalk"><img src="/images/btc_grey.png" alt="Bitcointalk" height="45px" width="45px"/></a></li>
|
|
<li><a class="youtube" href="//hush.is/youtube" target="_blank" data-toggle="tooltip" title="YouTube"><img src="/images/Youtube_grey.png" alt="YouTube" height="45px" width="45px"/></a></li>
|
|
<li><a class="git" href="//git.hush.is" target="_blank" data-toggle="tooltip" title="Git"><img src="/images/logo_github.svg" alt="Git" height="45px" width="45px"/></a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="contact-copyright">
|
|
<p>Copyright © 2016-<span id="s_year"></span> The Hush developers. All rights reserved.</p>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Scroll Top -->
|
|
<div class="animated fadeInRight" id="scroll-top">
|
|
<i class="fa fa-chevron-up"></i>
|
|
</div>
|
|
|
|
<!-- Scripts -->
|
|
<script type="text/javascript">
|
|
var today=new Date();
|
|
var year = today.getFullYear();
|
|
var syear = document.getElementById('s_year');
|
|
syear.innerHTML = year;
|
|
</script>
|
|
<script src="//code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.js"> </script>
|
|
<script src="/js/bootstrap.min.js"></script>
|
|
<script src="/js/scripts.js"></script>
|
|
<div class="modal fade" id="myModal">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-body">
|
|
|
|
<div class="close-button">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
|
|
|
|
</div>
|
|
<div class="embed-responsive embed-responsive-16by9">
|
|
<iframe class="embed-responsive-item" frameborder="0"></iframe>
|
|
</div>
|
|
</div>
|
|
|
|
</div><!-- /.modal-content -->
|
|
</div><!-- /.modal-dialog -->
|
|
</div><!-- /.modal -->
|
|
|
|
<script>
|
|
function log(s) {
|
|
console && console.log(s);
|
|
}
|
|
|
|
function count(time_seconds){
|
|
log("time_seconds="+time_seconds);
|
|
$('#seconds_until_hardfork').html( time_seconds );
|
|
|
|
var seconds = time_seconds;
|
|
var days = Math.floor(seconds / (3600*24));
|
|
seconds -= days*3600*24;
|
|
var hrs = Math.floor(seconds / 3600);
|
|
seconds -= hrs*3600;
|
|
var mnts = Math.floor(seconds / 60);
|
|
seconds -= mnts*60;
|
|
log("seconds = " + seconds);
|
|
|
|
if (days > 1) {
|
|
$('#days_until_hardfork').html(days+" days, "+hrs+"h "+mnts+"m "+seconds+"s");
|
|
} else if (days == 1) {
|
|
$('#days_until_hardfork').html(days+" day, "+hrs+"h "+mnts+"m "+seconds+"s");
|
|
} else {
|
|
$('#days_until_hardfork').html(hrs+"h "+mnts+"m "+seconds+"s");
|
|
}
|
|
|
|
var today = new Date();
|
|
// this uses milliseconds
|
|
const dafuq = new Date( Date.now() + time_seconds*1000);
|
|
var tomorrow = new Date();
|
|
tomorrow.setHours(hrs);
|
|
tomorrow.setMinutes(mnts);
|
|
tomorrow.setSeconds(seconds);
|
|
var timeStamp = tomorrow.setDate(today.getDate() + days);
|
|
ts = new Date(timeStamp);
|
|
//$('#date_hardfork').html(ts.toLocaleDateString() + " " + ts.toLocaleTimeString());
|
|
$('#date_hardfork').html(dafuq.toLocaleDateString() + " " + dafuq.toLocaleTimeString());
|
|
}
|
|
$( document ).ready(function() {
|
|
log("doc ready");
|
|
$.ajax({
|
|
url: "https://explorer.hush.land/api/getmininginfo.json",
|
|
type: "GET",
|
|
dataType : "json",
|
|
})
|
|
.done(function( json ) {
|
|
console.log(json);
|
|
$('#current_height').html( json.blocks );
|
|
try {
|
|
var height = json.blocks;
|
|
var hardfork = 1605555;
|
|
if (height < hardfork) {
|
|
var blocks_left = hardfork - json.blocks;
|
|
time_seconds = parseInt(blocks_left*75, 10);
|
|
$('#blocks_left').html("Only " + blocks_left + " blocks left!");
|
|
} else {
|
|
$('#blocks_left').html("z2z!");
|
|
$('#days_until_hardfork').html("The next halving will be in about four years, start getting ready!")
|
|
}
|
|
}
|
|
catch(error) {
|
|
console.error(error);
|
|
$('#seconds_until_hardfork').html("Oooops, error talking to explorer API !")
|
|
// expected output: ReferenceError: nonExistentFunction is not defined
|
|
// Note - error messages will vary depending on browser
|
|
}
|
|
|
|
log("count(" + time_seconds + ")" );
|
|
count(time_seconds);
|
|
console.log("Setting up timer");
|
|
var timeinterval = setInterval(function(){
|
|
log( "DOM seconds_until_hardfork" + $('#seconds_until_hardfork').html() );
|
|
var secs = parseInt( $('#seconds_until_hardfork').html() );
|
|
log("secs = " + secs);
|
|
secs -= 1;
|
|
console.log("updating timer with secs=" + secs);
|
|
count( secs );
|
|
if(secs <= 0){
|
|
//TODO: setup new halving interval
|
|
clearInterval(timeinterval);
|
|
}
|
|
},1000);
|
|
})
|
|
.fail(function( xhr, status, errorThrown ) {
|
|
//alert( "Ooops, error talking to explorer API!");
|
|
$('#seconds_until_hardfork').html("Ooops, error talking to explorer API !")
|
|
console.log( "Error: " + errorThrown );
|
|
console.log( "Status: " + status );
|
|
console.dir( xhr );
|
|
})
|
|
.always(function( xhr, status ) {
|
|
console.log("Finished!");
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<script>
|
|
if ($(window).width() < 960) {
|
|
|
|
(function ($) {
|
|
$('.modalButton').on('click', function (e) {
|
|
var src = $(this).attr('data-src');
|
|
window.open(src, '_blank').focus();
|
|
|
|
});
|
|
})(jQuery);
|
|
} else {
|
|
(function ($) {
|
|
|
|
function iframeModalOpen() {
|
|
|
|
|
|
$('.modalButton').on('click', function (e) {
|
|
var src = $(this).attr('data-src');
|
|
var width = $(this).attr('data-width') || 640;
|
|
var height = $(this).attr('data-height') || 360;
|
|
|
|
var allowfullscreen = $(this).attr('data-video-fullscreen');
|
|
|
|
|
|
$("#myModal iframe").attr({
|
|
'src': src,
|
|
'height': height,
|
|
'width': width,
|
|
'allowfullscreen': ''
|
|
});
|
|
});
|
|
|
|
|
|
$('#myModal').on('hidden.bs.modal', function () {
|
|
$(this).find('iframe').html("");
|
|
$(this).find('iframe').attr("src", "");
|
|
});
|
|
}
|
|
|
|
$(document).ready(function () {
|
|
iframeModalOpen();
|
|
});
|
|
|
|
})(jQuery);
|
|
}
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|
|
|