From 8d36c3cf2dd9b209aa6003ba19e983371ba670ec Mon Sep 17 00:00:00 2001 From: Mantas Date: Sun, 13 Aug 2017 18:19:54 +0300 Subject: Prepare for status.choraleapp.com, fix minor issues --- layouts/index.html | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) (limited to 'layouts/index.html') diff --git a/layouts/index.html b/layouts/index.html index 3853120..85b800a 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -145,7 +145,6 @@ document.querySelector('.component[data-id=forums]').setAttribute('data-status', 'ok'); document.querySelector('.component[data-id=website]').setAttribute('data-status', 'ok'); - document.querySelector('.component[data-id=gameserver]').setAttribute('data-status', 'notice'); /** * Get elements @@ -214,8 +213,7 @@ */ const status = document.querySelector('.component[data-id=forums]').getAttribute('data-status') === 'ok' && - document.querySelector('.component[data-id=website]').getAttribute('data-status') === 'ok' && - document.querySelector('.component[data-id=gameserver]').getAttribute('data-status') === 'ok' + document.querySelector('.component[data-id=website]').getAttribute('data-status') === 'ok' if (status) { // Change text @@ -241,35 +239,6 @@ } ) } - - - /** - * Check ping - */ - - // Links - const forumPingURL = 'https://api.choraleapp.com'; - const websiteURL = 'https://www.choraleapp.com'; - - // Lib - !function(a,b){"function"==typeof define&&define.amd?define([],b):"object"==typeof module&&module.exports?module.exports=b():a.ping=b()}(this,function(){function a(a){return new Promise(function(b,c){var d=new Image;d.onload=function(){b(d)},d.onerror=function(){c(a)},d.src=a+"?random-no-cache="+Math.floor(65536*(1+Math.random())).toString(16)})}function b(b,c){return new Promise(function(d,e){var f=(new Date).getTime(),g=function(){var a=(new Date).getTime()-f;a*=c||1,d(a)};a(b).then(g).catch(g),setTimeout(function(){e(Error("Timeout"))},5e3)})}return b}); - - // Check ping for everything - ping(forumPingURL).then(function(delta) { - document.querySelector('.component[data-id="forums"] .ping').innerHTML = String(delta) + 'ms'; - document.querySelector('.component[data-id="forums"] .ping').className = 'ping done'; - }).catch(function(err) { - document.querySelector('.component[data-id="forums"] .ping').innerHTML = 'Can’t ping'; - document.querySelector('.component[data-id="forums"] .ping').className = 'ping error'; - }) - - ping(websiteURL).then(function(delta) { - document.querySelector('.component[data-id="website"] .ping').innerHTML = String(delta) + 'ms'; - document.querySelector('.component[data-id="website"] .ping').className = 'ping done'; - }).catch(function(err) { - document.querySelector('.component[data-id="website"] .ping').innerHTML = 'Can’t ping'; - document.querySelector('.component[data-id="website"] .ping').className = 'ping error'; - }) {{ partial "footer" . }} -- cgit v1.2.3-70-g09d2