doctype html html(lang='en') head meta(charset='UTF-8') meta(name='viewport' content='width=device-width, initial-scale=1') meta(http-equiv='Content-Language', content='en') title=settings.shared_pages.page_title link(rel='stylesheet', href='/css/themes/' + settings.shared_pages.theme + '/bootstrap.min.css') link(rel='stylesheet', href='//use.fontawesome.com/releases/v5.15.1/css/all.css') if active == 'markets' || active == 'richlist' link(rel='stylesheet', href='/css/jquery.jqplot.min.css') if active == 'network' link(rel='stylesheet', href='/css/flag-icon.min.css') link(rel='stylesheet', type='text/css', href='//cdn.datatables.net/v/bs4/dt-1.10.22/datatables.min.css') link(rel='stylesheet', href='/css/style.min.css') script(type='text/javascript', src='//cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js', integrity='sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==', crossorigin='anonymous') script(type='text/javascript', src='//cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js', integrity='sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx', crossorigin='anonymous') if active == 'markets' || active == 'richlist' script(type='text/javascript', src='/js/jquery.jqplot.min.js') if active == 'markets' script(type='text/javascript', src='/js/jqplot.dateAxisRenderer.min.js') script(type='text/javascript', src='/js/jqplot.ohlcRenderer.min.js') script(type='text/javascript', src='/js/jqplot.highlighter.min.js') if active == 'richlist' script(type='text/javascript', src='/js/jqplot.pieRenderer.min.js') script(type='text/javascript', src='//cdn.datatables.net/v/bs4/dt-1.10.22/datatables.min.js') if active == 'reward' script(type='text/javascript', src='/js/Chart.min.js') script. /* Special thanks to the stackoverflow community for the getParameterByName function: https://stackoverflow.com/a/901144/3038650 */ function getParameterByName(name, url = window.location.href) { name = name.replace(/[\[\]]/g, '\\$&'); var regex = new RegExp('[?&]' + name + '(=([^]*)|&|#|$)'), results = regex.exec(url); if (!results) return null; if (!results[2]) return ''; return decodeURIComponent(results[2].replace(/\+/g, ' ')); } function fixFooterHeightAndPosition() { var screenWidth = $(window).width(); if (screenWidth <= 575) { // Mobile $('#footer-container').css('height', '!{settings.shared_pages.page_footer.footer_height_mobile}'); } else if (screenWidth >= 576 && screenWidth <= 991) { // Tablet $('#footer-container').css('height', '!{settings.shared_pages.page_footer.footer_height_tablet}'); } else { // Desktop $('#footer-container').css('height', '!{settings.shared_pages.page_footer.footer_height_desktop}'); } if (!#{settings.shared_pages.page_footer.sticky_footer}) { // Wait a tick before fixing footer position to give time for elements to be rendered var nonStickyFooterSetIntervalID = setInterval(function() { // Stop setInterval from running again clearInterval(nonStickyFooterSetIntervalID); // Ensure footer is shown at the bottom of the viewport var offset = (window.innerHeight - $('#footer-container').position().top - $('#footer-container').outerHeight()); $('#footer-container').css('margin-top', (offset > 0 ? offset : '10') + 'px'); }, 1, "tmrFixFooter"); } else { // Add spacing to the bottom of the body for the sticky footer $('body').css('margin-bottom', ($('#footer-container').outerHeight() + 10) + 'px'); } fixSocialLinkFontSize(); } function fixSocialLinkFontSize() { var fontSize = $('#footer-container').height() * (getSocialLinkHeight() / 100); $('#footer-container .social-link').css('font-size', fontSize); $('#footer-container .social-link > img').css('width', fontSize + 'px').css('height', fontSize + 'px'); } function getSocialLinkHeight() { var retVal = 70; var screenWidth = $(window).width(); if (screenWidth <= 575) { // Mobile retVal = !{settings.shared_pages.page_footer.social_link_percent_height_mobile}; } else if (screenWidth >= 576 && screenWidth <= 991) { // Tablet retVal = !{settings.shared_pages.page_footer.social_link_percent_height_tablet}; } else { // Desktop retVal = !{settings.shared_pages.page_footer.social_link_percent_height_desktop}; } return retVal; } function enableTooltips() { if ($().tooltip) { // Enable tooltips only if browser supports them $('[data-toggle="tooltip"]').tooltip(); } } function fixDataTableColumns() { // Wait 2 ticks before adjusting table columns to give time for elements to be rendered (1 tick doesn't seem to be enough for some tables) var ColumnAdjustSetIntervalID = setInterval(function() { // Stop setInterval from running again clearInterval(ColumnAdjustSetIntervalID); // Ensure columns are properly aligned $($.fn.dataTable.tables(true)).DataTable().columns.adjust(); }, 2, 'adjustTableColumns'); } $(document).ready(function() { if ('#{active}' != '') $('##{active}').addClass('active'); function showTopPanelData(dataElement, loadingElement) { if ($('#' + loadingElement).length) { $('#' + loadingElement).fadeOut('slow', function() { $('#' + loadingElement).remove(); $('#' + dataElement).fadeIn(); }); } } function update_stats() { $.ajax({url: '/ext/getsummary', headers: {Accept: 'application/json, text/javascript, */*; q=0.01'}, success: function(json) { if (json.masternodeCountOnline == null) json.masternodeCountOnline = '-'; if (json.masternodeCountOffline == null) json.masternodeCountOffline = '-'; var mnOnlineText = json.masternodeCountOnline+" node"+(json.masternodeCountOnline == 1 ? "" : "s")+" online"; var mnOfflineText = json.masternodeCountOffline+" unreachable node"+(json.masternodeCountOffline == 1 ? "" : "s"); $("#masternodeCountOnline").text(json.masternodeCountOnline).prop("alt", mnOnlineText).prop("title", mnOnlineText).attr("data-original-title", mnOnlineText); $("#masternodeCountOffline").text(json.masternodeCountOffline).prop("alt", mnOfflineText).prop("title", mnOfflineText).attr("data-original-title", mnOfflineText); $("#spnMasternodeCountOnline").prop("alt", mnOnlineText).prop("title", mnOnlineText).attr("data-original-title", mnOnlineText); $("#spnMasternodeCountOffline").prop("alt", mnOfflineText).prop("title", mnOfflineText).attr("data-original-title", mnOfflineText); showTopPanelData('masternodepanel', 'masternodePanelLoading'); var supplyString = json.supply; var diffString = json.difficulty; var hashrateString = json.hashrate; var splitValue, splitParts; if (!isNaN(json.difficulty)) diffString = Number(json.difficulty).toLocaleString('en',{'minimumFractionDigits':2,'maximumFractionDigits':8,'useGrouping':true}); if (!isNaN(json.supply)) supplyString = parseInt(parseFloat(json.supply).toFixed(0)).toLocaleString('en'); if (!isNaN(json.hashrate)) hashrateString = Number(json.hashrate).toLocaleString('en',{'minimumFractionDigits':2,'maximumFractionDigits':8,'useGrouping':true}); $("#supply").text(supplyString); splitValue = Number(parseFloat(json.lastPrice).toFixed(8) * parseInt(parseFloat(json.supply).toFixed(0))).toLocaleString('en',{'minimumFractionDigits':2,'maximumFractionDigits':8,'useGrouping':true}); splitParts = splitValue.split('.'); showTopPanelData('supplypanel', 'supplyPanelLoading'); $("#marketCap").html(splitParts[0] + '.' + splitParts[1] + ''); showTopPanelData('marketCapPanel', 'marketCapPanelLoading'); splitParts = diffString.split('.'); $("#difficulty").html(splitParts[0] + '.' + splitParts[1] + ''); if (json.difficultyHybrid == null || json.difficultyHybrid == '') $("#difficultyHybrid").html('-'); else { splitParts = json.difficultyHybrid.split('.'); $("#difficultyHybrid").html(splitParts[0] + '.' + splitParts[1] + ''); } showTopPanelData('difficultypanel', 'difficultyPanelLoading'); if (hashrateString == null || hashrateString == '' || hashrateString == '-') $("#hashrate").html('-'); else { splitParts = hashrateString.split('.'); $("#hashrate").html(splitParts[0] + '.' + splitParts[1] + ''); } showTopPanelData('hashratepanel', 'hashratePanelLoading'); splitValue = Number(json.lastPrice).toLocaleString('en',{'minimumFractionDigits':2,'maximumFractionDigits':8,'useGrouping':true}); splitParts = splitValue.split('.'); $("#lastPrice").html(splitParts[0] + '.' + splitParts[1] + ''); showTopPanelData('pricepanel', 'pricePanelLoading'); $("#lblConnections").text(json.connections + ' connections'); $("#lblBlockcount").text(json.blockcount + ' blocks'); }}); } $('.iquidus').css('color',$('.table').css('color')); $(window).resize(function () { fixDataTableColumns(); fixFooterHeightAndPosition(); }); setInterval(function() { update_stats(); }, 60000); update_stats(); function getNetworkPanel() { var networkSuffix=''; switch ('#{settings.shared_pages.page_header.panels.network_panel.nethash_units}') { case "K": networkSuffix='(KH/s)'; break; case "M": networkSuffix='(MH/s)'; break; case "G": networkSuffix='(GH/s)'; break; case "T": networkSuffix='(TH/s)'; break; case "P": networkSuffix='(PH/s)'; break; case "H": networkSuffix='(H/s)'; break; } var hashRateType=''; return '