From ab4267acfb1fc8d44cd015a88ab89bbb5d21eac8 Mon Sep 17 00:00:00 2001 From: Kcchouette Date: Sun, 3 Mar 2019 03:31:03 +0100 Subject: [PATCH] Adding link to online gateway (#42) --- app.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index 38a46ca..2bef5f6 100644 --- a/app.js +++ b/app.js @@ -3,12 +3,17 @@ const hashString = 'Hello from IPFS Gateway Checker' const $results = document.querySelector('#results') +function returnHtmlLink (gateway) { + let gatewayTitle = gateway.split(hashToTest)[0] + return '' + gateway + '' +} + function addNode (gateway, online, title) { const para = document.createElement('div') let node if (online) { node = document.createElement('strong') - node.innerText = '✅ - Online - ' + gateway + node.innerHTML = '✅ - Online - ' + returnHtmlLink(gateway) } else { node = document.createElement('div') node.innerText = '❌ - Offline - ' + gateway