From c9e6ecee39e40aa0c63465445326c2018602d667 Mon Sep 17 00:00:00 2001 From: Sydney Bizkut Date: Thu, 13 Feb 2020 14:55:36 -0800 Subject: [PATCH] better redirection script --- static/ipfs.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/static/ipfs.js b/static/ipfs.js index 0aa7aed..68c3496 100644 --- a/static/ipfs.js +++ b/static/ipfs.js @@ -1,2 +1,11 @@ -if (window.ipfs !== undefined) - window.location.href = "ipns://" + window.location.host; \ No newline at end of file +if (window.ipfs !== undefined) { + var href = "ipns://" + window.location.host; + document.title = "IPFS Redirection" + document.querySelector("#intro > div > div > div > div > div > h1").innerHTML = "IPFS Found"; + document.querySelector("body > nav > div > div.navbar-header.page-scroll > a").innerHTML = "IPFS Found"; + document.querySelector("#intro > div > div > div > div > div > h3").innerHTML = "Please wait while we redirect you."; + document.querySelector("#main").remove(); + document.querySelector("#social-share-section").remove(); + document.querySelector("#intro > div > div > div > div > div").insertAdjacentHTML('beforeend', '

Click here if you are not immediately redirected

'); + window.location.href = href; +} \ No newline at end of file