diff --git a/_layouts/default.html b/_layouts/default.html index d8cc73ff8c8fb8f281c0721ee9725e473809556a..354844891b2de64ecd2e82b17db7191cdc6e7232 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -5,8 +5,8 @@ <meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" > <meta property="og:image" content="{{ '/images/sticker.png' | relative_url }}" /> + <script src="https://cdn.jsdelivr.net/npm/@hiveio/hive-js/dist/hive.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/turbolinks/5.2.0/turbolinks.js" integrity="sha256-iM4Yzi/zLj/IshPWMC1IluRxTtRjMqjPGd97TZ9yYpU=" crossorigin="anonymous"></script> <link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet" /> <link href="https://fonts.googleapis.com/css?family=Cousine|Inconsolata" rel="stylesheet" /> <link rel="shortcut icon" type="image/png" href="{{ '/favicon.png' | relative_url }}" /> diff --git a/_quickstart/hive_full_nodes.md b/_quickstart/hive_full_nodes.md index 7cf62cd94d417c40dbaec59dedfacc5991ea0f58..fb2a3769d1cae9d1a835edbb580942ed803c7fbd 100644 --- a/_quickstart/hive_full_nodes.md +++ b/_quickstart/hive_full_nodes.md @@ -10,19 +10,92 @@ Applications that interface directly with the Hive blockchain will need to conne Although `hived` fully supports WebSockets (`wss://` and `ws://`) public nodes typically do not. All nodes listed use HTTPS (`https://`). If you require WebSockets for your solutions, please consider setting up your own `hived` node or proxy WebSockets to HTTPS using [lineman](https://gitlab.syncad.com/hive/lineman). -| URL | Owner | -| ------------------------------- | -------------- | -| api.hive.blog | @blocktrades | -| api.openhive.network | @gtg | -| anyx.io | @anyx | -| api.hivekings.com | @drakos | -| hived.privex.io | @privex | -| rpc.ausbit.dev | @ausbitbank | -| api.pharesim.me | @pharesim | -| techcoderx.com | @techcoderx | -| rpc.esteem.app | @esteem | -| hive.roelandp.nl | @roelandp | -| hived.emre.sh | @emrebeyler | +<div id="report"> + <table> + <thead> + <tr><th>URL</th><th>Owner</th><th style="display: none;"></th></tr> + </thead> + <tbody> + <tr><td>api.hive.blog</td><td>@blocktrades</td><td style="display: none;"></td></tr> + <tr><td>api.openhive.network</td><td>@gtg</td><td style="display: none;"></td></tr> + <tr><td>anyx.io</td><td>@anyx</td><td style="display: none;"></td></tr> + <tr><td>api.hivekings.com</td><td>@drakos</td><td style="display: none;"></td></tr> + <tr><td>hived.privex.io</td><td>@privex</td><td style="display: none;"></td></tr> + <tr><td>rpc.ausbit.dev</td><td>@ausbitbank</td><td style="display: none;"></td></tr> + <tr><td>techcoderx.com</td><td>@techcoderx</td><td style="display: none;"></td></tr> + <tr><td>rpc.ecency.com</td><td>@ecency</td><td style="display: none;"></td></tr> + <tr><td>hive.roelandp.nl</td><td>@roelandp</td><td style="display: none;"></td></tr> + <tr><td>hived.emre.sh</td><td>@emrebeyler</td><td style="display: none;"></td></tr> + <tr><td>api.deathwing.me</td><td>@deathwing</td><td style="display: none;"></td></tr> + <tr><td>api.c0ff33a.uk</td><td>@c0ff33a</td><td style="display: none;"></td></tr> + <tr><td>hive-api.arcange.eu</td><td>@arcange</td><td style="display: none;"></td></tr> + </tbody> + </table> +</div> + +<div id="untracked_report"></div> + +<script> + $(document).ready(function() { + hive.api.getAccounts(['fullnodeupdate'], function(err, result) { + var fullnodeupdate = result[0]; + var reportData = jQuery.parseJSON(fullnodeupdate.json_metadata).report; + var failingNodes = jQuery.parseJSON(fullnodeupdate.json_metadata).failing_nodes; + var reportRows = $('#report > table > tbody > tr'); + var tracked = []; + + jQuery.each(reportRows, function(i, row) { + jQuery.each(reportData, function(j, r) { + var host = $(row).find('td:nth-child(1)').text(); + + if ( (r.node.indexOf(host) != -1 || !r.hive) && !tracked.includes(j) ) { + tracked.push(j); + } + + with ( $(row).find('td:nth-child(3)') ) { + if ( r.node.indexOf(host) != -1 && !!r.hive ) { + html('Version: <code>' + r.version + '</code> ' + (r.history.ok ? '✅' : 'âš ï¸')); + } else { + jQuery.each(Object.keys(failingNodes), function(k, f) { + if ( f.indexOf(host) != -1 ) { + html('Failing â›”'); + } + }); + } + + show(); + } + }); + }); + + with ( $('#report > table > thead > tr > th:nth-child(3)') ) { + text('Details'); + show(); + } + + with ( $('#untracked_report') ) { + empty(); + + if ( tracked.length != reportData.length ) { + append("<p>Also see the following public nodes:</p><ul>"); + + jQuery.each(reportData, function(i, r) { + if ( !!r.hive && !tracked.includes(i) ) { + var host = r.node.split('https://')[1]; + + if ( !!host && host.length > 0 ) { + append('<li>' + host + ', version: <code>' + r.version + '</code> ' + (r.history.ok ? '✅' : 'âš ï¸') + '</li>'); + } + } + }); + + append("</ul><p> </p>"); + } + } + }); + }); + +</script> For a report on the latest public full nodes, check the latest posts on [@fullnodeupdate](https://hive.blog/@fullnodeupdate) by [@holger80](https://hive.blog/@holger80). diff --git a/_sass/_main.scss b/_sass/_main.scss index 8d69c9451cf47730b6335d977e9b46464e84b165..118ad710299f55ae7cbe1ec91f2cb9b6e7bf3438 100644 --- a/_sass/_main.scss +++ b/_sass/_main.scss @@ -726,9 +726,3 @@ a[href*='tutorials-ruby'] { background-position: right top; padding-left: .90em; } - -// See: https://github.com/turbolinks/turbolinks#displaying-progress -.turbolinks-progress-bar { - height: 5px; - background-color: $brand-colour; -} diff --git a/js/main.js b/js/main.js index 7c3d15d878a049d8d372effcb7b036d16457f38d..a2d4d3e457e28775e56db6946302765ea0d4022f 100644 --- a/js/main.js +++ b/js/main.js @@ -100,7 +100,7 @@ function getClosestHeader() { } -$(document).on('ready turbolinks:load', function() { +$(document).ready(function() { // Select all links with hashes $('a[href*="#"]') // Remove links that don't actually link to anything